vless.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. {{define "form/vless"}}
  2. <a-form layout="inline">
  3. <a-collapse activeKey="0" v-for="(client, index) in inbound.settings.vlesses.slice(0,1)" v-if="!isEdit">
  4. <a-collapse-panel header='{{ i18n "pages.inbounds.client" }}'>
  5. <a-form-item>
  6. <span slot="label">
  7. <span>{{ i18n "pages.inbounds.Email" }}</span>
  8. <a-tooltip>
  9. <template slot="title">
  10. <span>{{ i18n "pages.inbounds.EmailDesc" }}</span>
  11. </template>
  12. <a-icon type="sync" @click="getNewEmail(client)"></a-icon>
  13. </a-tooltip>
  14. </span>
  15. <a-input v-model.trim="client.email" style="width: 150px;"></a-input>
  16. </a-form-item>
  17. <a-form-item label="ID">
  18. <a-input v-model.trim="client.id" style="width: 300px;"></a-input>
  19. </a-form-item>
  20. <a-form-item label="Subscription" v-if="client.email">
  21. <a-input v-model.trim="client.subId"></a-input>
  22. </a-form-item>
  23. <a-form-item label="Telegram Username" v-if="client.email">
  24. <a-input v-model.trim="client.tgId"></a-input>
  25. </a-form-item>
  26. <a-form-item>
  27. <span slot="label">
  28. <span>{{ i18n "pages.inbounds.IPLimit" }}</span>
  29. <a-tooltip>
  30. <template slot="title">
  31. <span>{{ i18n "pages.inbounds.IPLimitDesc" }}</span>
  32. </template>
  33. <a-icon type="question-circle" theme="filled"></a-icon>
  34. </a-tooltip>
  35. </span>
  36. <a-input-number v-model="client.limitIp" min="0" style="width: 70px;"></a-input-number>
  37. </a-form-item>
  38. <a-form-item v-if="inbound.xtls" label="Flow">
  39. <a-select v-model="inbound.settings.vlesses[index].flow" style="width: 200px" :dropdown-class-name="siderDrawer.isDarkTheme ? 'ant-card-dark' : ''">
  40. <a-select-option value="" selected>{{ i18n "none" }}</a-select-option>
  41. <a-select-option v-for="key in XTLS_FLOW_CONTROL" :value="key">[[ key ]]</a-select-option>
  42. </a-select>
  43. </a-form-item>
  44. <a-form-item v-else-if="inbound.canEnableTlsFlow()" label="Flow" layout="inline">
  45. <a-select v-model="inbound.settings.vlesses[index].flow" style="width: 200px" :dropdown-class-name="siderDrawer.isDarkTheme ? 'ant-card-dark' : ''">
  46. <a-select-option value="" selected>{{ i18n "none" }}</a-select-option>
  47. <a-select-option v-for="key in TLS_FLOW_CONTROL" :value="key">[[ key ]]</a-select-option>
  48. </a-select>
  49. </a-form-item>
  50. <a-form-item>
  51. <span slot="label">
  52. <span >{{ i18n "pages.inbounds.totalFlow" }}</span> (GB)
  53. <a-tooltip>
  54. <template slot="title">
  55. 0 <span>{{ i18n "pages.inbounds.meansNoLimit" }}</span>
  56. </template>
  57. <a-icon type="question-circle" theme="filled"></a-icon>
  58. </a-tooltip>
  59. </span>
  60. <a-input-number v-model="client._totalGB" :min="0"></a-input-number>
  61. </a-form-item>
  62. <a-form-item label='{{ i18n "pages.client.delayedStart" }}'>
  63. <a-switch v-model="delayedStart" @click="client._expiryTime=0"></a-switch>
  64. </a-form-item>
  65. <a-form-item v-if="delayedStart" label='{{ i18n "pages.client.expireDays" }}'>
  66. <a-input-number v-model.number="delayedExpireDays" :min="0"></a-input-number>
  67. </a-form-item>
  68. <a-form-item>
  69. <span slot="label">
  70. <span >{{ i18n "pages.inbounds.expireDate" }}</span>
  71. <a-tooltip>
  72. <template slot="title">
  73. <span>{{ i18n "pages.inbounds.leaveBlankToNeverExpire" }}</span>
  74. </template>
  75. <a-icon type="question-circle" theme="filled"></a-icon>
  76. </a-tooltip>
  77. </span>
  78. <a-date-picker :show-time="{ format: 'HH:mm:ss' }" format="YYYY-MM-DD HH:mm:ss"
  79. :dropdown-class-name="siderDrawer.isDarkTheme ? 'ant-card-dark' : ''"
  80. v-model="client._expiryTime" style="width: 170px;"></a-date-picker>
  81. </a-form-item>
  82. </a-collapse-panel>
  83. </a-collapse>
  84. <a-collapse v-else>
  85. <a-collapse-panel :header="'{{ i18n "pages.client.clientCount"}} : ' + inbound.settings.vlesses.length">
  86. <table width="100%">
  87. <tr class="client-table-header">
  88. <th v-for="col in Object.keys(inbound.settings.vlesses[0]).slice(0, 3)">[[ col ]]</th>
  89. </tr>
  90. <tr v-for="(client, index) in inbound.settings.vlesses" :class="index % 2 == 1 ? 'client-table-odd-row' : ''">
  91. <td v-for="col in Object.values(client).slice(0, 3)">[[ col ]]</td>
  92. </tr>
  93. </table>
  94. </a-collapse-panel>
  95. </a-collapse>
  96. <template v-if="inbound.isTcp">
  97. <a-form layout="inline">
  98. <a-form-item label="Fallbacks">
  99. <a-row>
  100. <a-button type="primary" size="small"
  101. @click="inbound.settings.addFallback()">
  102. +
  103. </a-button>
  104. </a-row>
  105. </a-form-item>
  106. </a-form>
  107. <!-- vless fallbacks -->
  108. <a-form v-for="(fallback, index) in inbound.settings.fallbacks" layout="inline">
  109. <a-divider>
  110. fallback[[ index + 1 ]]
  111. <a-icon type="delete" @click="() => inbound.settings.delFallback(index)"
  112. style="color: rgb(255, 77, 79);cursor: pointer;"/>
  113. </a-divider>
  114. <a-form-item label="Name">
  115. <a-input v-model="fallback.name"></a-input>
  116. </a-form-item>
  117. <a-form-item label="Alpn">
  118. <a-input v-model="fallback.alpn"></a-input>
  119. </a-form-item>
  120. <a-form-item label="Path">
  121. <a-input v-model="fallback.path"></a-input>
  122. </a-form-item>
  123. <a-form-item label="Dest">
  124. <a-input v-model="fallback.dest"></a-input>
  125. </a-form-item>
  126. <a-form-item label="xVer">
  127. <a-input-number v-model="fallback.xver"></a-input-number>
  128. </a-form-item>
  129. <a-divider v-if="inbound.settings.fallbacks.length - 1 === index"/>
  130. </a-form>
  131. </template>
  132. {{end}}