vless.html 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. <a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
  46. <a-form-item label="Fallbacks">
  47. <a-button icon="plus" type="primary" size="small" @click="inbound.settings.addFallback()"></a-button>
  48. </a-form-item>
  49. </a-form>
  50. <!-- vless fallbacks -->
  51. <a-form v-for="(fallback, index) in inbound.settings.fallbacks" :colon="false" :label-col="{ md: {span:8} }"
  52. :wrapper-col="{ md: {span:14} }">
  53. <a-divider :style="{ margin: '0' }"> Fallback [[ index + 1 ]] <a-icon type="delete"
  54. @click="() => inbound.settings.delFallback(index)"
  55. :style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"></a-icon>
  56. </a-divider>
  57. <a-form-item label='SNI'>
  58. <a-input v-model="fallback.name"></a-input>
  59. </a-form-item>
  60. <a-form-item label='ALPN'>
  61. <a-input v-model="fallback.alpn"></a-input>
  62. </a-form-item>
  63. <a-form-item label='Path'>
  64. <a-input v-model="fallback.path"></a-input>
  65. </a-form-item>
  66. <a-form-item label='Dest'>
  67. <a-input v-model="fallback.dest"></a-input>
  68. </a-form-item>
  69. <a-form-item label='xVer'>
  70. <a-input-number v-model.number="fallback.xver" :min="0" :max="2"></a-input-number>
  71. </a-form-item>
  72. </a-form>
  73. <a-divider :style="{ margin: '5px 0' }"></a-divider>
  74. </template>
  75. <template v-if="inbound.canEnableVisionSeed()">
  76. <a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
  77. <a-form-item
  78. :validate-status="testseedError() ? 'error' : ''"
  79. :help="testseedError() || ''">
  80. <template slot="label">
  81. Vision Seed
  82. <a-tooltip title="Optional. Controls XTLS Vision padding. Provide exactly 4 positive integers, or leave empty to use defaults: [900, 500, 900, 256].">
  83. <a-icon type="question-circle" :style="{ marginLeft: '4px' }"></a-icon>
  84. </a-tooltip>
  85. </template>
  86. <a-row :gutter="8">
  87. <a-col :span="6">
  88. <a-input-number
  89. :value="(inbound.settings.testseed && inbound.settings.testseed[0] !== undefined) ? inbound.settings.testseed[0] : null"
  90. @change="(val) => updateTestseed(0, val)" :min="1" :max="9999" :style="{ width: '100%' }" placeholder="900"
  91. addon-before="[0]"></a-input-number>
  92. </a-col>
  93. <a-col :span="6">
  94. <a-input-number
  95. :value="(inbound.settings.testseed && inbound.settings.testseed[1] !== undefined) ? inbound.settings.testseed[1] : null"
  96. @change="(val) => updateTestseed(1, val)" :min="1" :max="9999" :style="{ width: '100%' }" placeholder="500"
  97. addon-before="[1]"></a-input-number>
  98. </a-col>
  99. <a-col :span="6">
  100. <a-input-number
  101. :value="(inbound.settings.testseed && inbound.settings.testseed[2] !== undefined) ? inbound.settings.testseed[2] : null"
  102. @change="(val) => updateTestseed(2, val)" :min="1" :max="9999" :style="{ width: '100%' }" placeholder="900"
  103. addon-before="[2]"></a-input-number>
  104. </a-col>
  105. <a-col :span="6">
  106. <a-input-number
  107. :value="(inbound.settings.testseed && inbound.settings.testseed[3] !== undefined) ? inbound.settings.testseed[3] : null"
  108. @change="(val) => updateTestseed(3, val)" :min="1" :max="9999" :style="{ width: '100%' }" placeholder="256"
  109. addon-before="[3]"></a-input-number>
  110. </a-col>
  111. </a-row>
  112. <a-space :size="8" :style="{ marginTop: '8px' }">
  113. <a-button type="primary" @click="setRandomTestseed">
  114. Rand
  115. </a-button>
  116. <a-button @click="resetTestseed">
  117. Reset
  118. </a-button>
  119. </a-space>
  120. <div :style="{ marginTop: '6px', fontSize: '12px', color: 'inherit', opacity: 0.65, lineHeight: 1.4 }">
  121. Optional. Controls XTLS Vision padding behavior (used only for xtls-rprx-vision).
  122. Provide exactly four positive integers to customize padding; otherwise leave empty to use safe defaults.
  123. </div>
  124. </a-form-item>
  125. </a-form>
  126. <a-divider :style="{ margin: '5px 0' }"></a-divider>
  127. </template>
  128. {{end}}