1
0

vless.html 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. {{define "form/vless"}}
  2. <a-collapse activeKey="0" v-for="(client, index) in inbound.settings.vlesses.slice(0,1)" v-if="!isEdit">
  3. <a-collapse-panel header='{{ i18n "pages.inbounds.client" }}'>
  4. {{template "form/client" .}}
  5. </a-collapse-panel>
  6. </a-collapse>
  7. <a-collapse v-else>
  8. <a-collapse-panel :header="'{{ i18n "pages.client.clientCount"}} : ' +
  9. inbound.settings.vlesses.length">
  10. <table width="100%">
  11. <tr class="client-table-header">
  12. <th>{{ i18n "pages.inbounds.email" }}</th>
  13. <th>ID</th>
  14. </tr>
  15. <tr v-for="(client, index) in inbound.settings.vlesses" :class="index % 2 == 1 ? ' client-table-odd-row' : ''">
  16. <td>[[ client.email ]]</td>
  17. <td>[[ client.id ]]</td>
  18. </tr>
  19. </table>
  20. </a-collapse-panel>
  21. </a-collapse>
  22. <template v-if=" !inbound.stream.isTLS || !inbound.stream.isReality">
  23. <a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
  24. <a-form-item label="decryption">
  25. <a-input v-model.trim="inbound.settings.decryption"></a-input>
  26. </a-form-item>
  27. <a-form-item label="encryption">
  28. <a-input v-model="inbound.settings.encryption"></a-input>
  29. </a-form-item>
  30. <a-form-item label=" ">
  31. <a-space :size="8" wrap>
  32. <a-button type="primary" icon="import" @click="getNewVlessEnc('X25519, not Post-Quantum')">
  33. X25519
  34. </a-button>
  35. <a-button type="primary" icon="import" @click="getNewVlessEnc('ML-KEM-768, Post-Quantum')">
  36. ML-KEM-768
  37. </a-button>
  38. <a-button danger @click="clearVlessEnc">Clear</a-button>
  39. </a-space>
  40. </a-form-item>
  41. </a-form>
  42. <a-divider :style="{ margin: '5px 0' }"></a-divider>
  43. </template>
  44. <template v-if="inbound.isTcp && (!inbound.settings.encryption || inbound.settings.encryption === 'none')">
  45. {{template "form/fallbacks" .}}
  46. <a-divider :style="{ margin: '5px 0' }"></a-divider>
  47. </template>
  48. <template v-if="inbound.canEnableVisionSeed()">
  49. <a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
  50. <a-form-item
  51. :validate-status="testseedError() ? 'error' : ''"
  52. :help="testseedError() || ''">
  53. <template slot="label">
  54. Vision Seed
  55. <a-tooltip title="Optional. Controls XTLS Vision padding. Provide exactly 4 positive integers, or leave empty to use defaults: [900, 500, 900, 256].">
  56. <a-icon type="question-circle" :style="{ marginLeft: '4px' }"></a-icon>
  57. </a-tooltip>
  58. </template>
  59. <a-row :gutter="8">
  60. <a-col :span="6">
  61. <a-input-number
  62. :value="(inbound.settings.testseed && inbound.settings.testseed[0] !== undefined) ? inbound.settings.testseed[0] : null"
  63. @change="(val) => updateTestseed(0, val)" :min="1" :max="9999" :style="{ width: '100%' }" placeholder="900"
  64. addon-before="[0]"></a-input-number>
  65. </a-col>
  66. <a-col :span="6">
  67. <a-input-number
  68. :value="(inbound.settings.testseed && inbound.settings.testseed[1] !== undefined) ? inbound.settings.testseed[1] : null"
  69. @change="(val) => updateTestseed(1, val)" :min="1" :max="9999" :style="{ width: '100%' }" placeholder="500"
  70. addon-before="[1]"></a-input-number>
  71. </a-col>
  72. <a-col :span="6">
  73. <a-input-number
  74. :value="(inbound.settings.testseed && inbound.settings.testseed[2] !== undefined) ? inbound.settings.testseed[2] : null"
  75. @change="(val) => updateTestseed(2, val)" :min="1" :max="9999" :style="{ width: '100%' }" placeholder="900"
  76. addon-before="[2]"></a-input-number>
  77. </a-col>
  78. <a-col :span="6">
  79. <a-input-number
  80. :value="(inbound.settings.testseed && inbound.settings.testseed[3] !== undefined) ? inbound.settings.testseed[3] : null"
  81. @change="(val) => updateTestseed(3, val)" :min="1" :max="9999" :style="{ width: '100%' }" placeholder="256"
  82. addon-before="[3]"></a-input-number>
  83. </a-col>
  84. </a-row>
  85. <a-space :size="8" :style="{ marginTop: '8px' }">
  86. <a-button type="primary" @click="setRandomTestseed">
  87. Rand
  88. </a-button>
  89. <a-button @click="resetTestseed">
  90. Reset
  91. </a-button>
  92. </a-space>
  93. <div :style="{ marginTop: '6px', fontSize: '12px', color: 'inherit', opacity: 0.65, lineHeight: 1.4 }">
  94. Optional. Controls XTLS Vision padding behavior (used only for xtls-rprx-vision).
  95. Provide exactly four positive integers to customize padding; otherwise leave empty to use safe defaults.
  96. </div>
  97. </a-form-item>
  98. </a-form>
  99. <a-divider :style="{ margin: '5px 0' }"></a-divider>
  100. </template>
  101. {{end}}