1
0

inbound.html 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. {{define "form/inbound"}}
  2. <!-- base -->
  3. <a-form :colon="false" :label-col="{ md: {span:8} }"
  4. :wrapper-col="{ md: {span:14} }">
  5. <a-form-item label='{{ i18n "enable" }}'>
  6. <a-switch v-model="dbInbound.enable"></a-switch>
  7. </a-form-item>
  8. <a-form-item label='{{ i18n "remark" }}'>
  9. <a-input v-model.trim="dbInbound.remark"></a-input>
  10. </a-form-item>
  11. <a-form-item label='{{ i18n "protocol" }}'>
  12. <a-select v-model="inbound.protocol" :disabled="isEdit"
  13. :dropdown-class-name="themeSwitcher.currentTheme">
  14. <a-select-option v-for="p in Protocols" :key="p" :value="p">[[ p
  15. ]]</a-select-option>
  16. </a-select>
  17. </a-form-item>
  18. <a-form-item>
  19. <template slot="label">
  20. <a-tooltip>
  21. <template slot="title">
  22. <span>{{ i18n "pages.inbounds.monitorDesc" }}</span>
  23. </template>
  24. {{ i18n "monitor" }}
  25. <a-icon type="question-circle"></a-icon>
  26. </a-tooltip>
  27. </template>
  28. <a-input v-model.trim="inbound.listen"></a-input>
  29. </a-form-item>
  30. <a-form-item label='{{ i18n "pages.inbounds.port" }}'>
  31. <a-input-number v-model.number="inbound.port" :min="1"
  32. :max="65535"></a-input-number>
  33. </a-form-item>
  34. <a-form-item>
  35. <template slot="label">
  36. <a-tooltip>
  37. <template slot="title">
  38. 0 <span>{{ i18n "pages.inbounds.meansNoLimit" }}</span>
  39. </template>
  40. {{ i18n "pages.inbounds.totalFlow" }}
  41. <a-icon type="question-circle"></a-icon>
  42. </a-tooltip>
  43. </template>
  44. <a-input-number v-model.number="dbInbound.totalGB"
  45. :min="0"></a-input-number>
  46. </a-form-item>
  47. <a-form-item>
  48. <template slot="label">
  49. <a-tooltip>
  50. <template slot="title">
  51. <span>{{ i18n "pages.inbounds.periodicTrafficResetDesc"
  52. }}</span>
  53. <br
  54. v-if="dbInbound.lastTrafficResetTime && dbInbound.lastTrafficResetTime > 0">
  55. <span
  56. v-if="dbInbound.lastTrafficResetTime && dbInbound.lastTrafficResetTime > 0">
  57. <strong>{{ i18n "pages.inbounds.lastReset" }}:</strong>
  58. <span>[[
  59. IntlUtil.formatDate(dbInbound.lastTrafficResetTime)
  60. ]]</span>
  61. </span>
  62. </template>
  63. {{ i18n "pages.inbounds.periodicTrafficResetTitle" }}
  64. <a-icon type="question-circle"></a-icon>
  65. </a-tooltip>
  66. </template>
  67. <a-select v-model="dbInbound.trafficReset"
  68. :dropdown-class-name="themeSwitcher.currentTheme">
  69. <a-select-option value="never">{{ i18n
  70. "pages.inbounds.periodicTrafficReset.never" }}</a-select-option>
  71. <a-select-option value="hourly">{{ i18n
  72. "pages.inbounds.periodicTrafficReset.hourly"
  73. }}</a-select-option>
  74. <a-select-option value="daily">{{ i18n
  75. "pages.inbounds.periodicTrafficReset.daily" }}</a-select-option>
  76. <a-select-option value="weekly">{{ i18n
  77. "pages.inbounds.periodicTrafficReset.weekly"
  78. }}</a-select-option>
  79. <a-select-option value="monthly">{{ i18n
  80. "pages.inbounds.periodicTrafficReset.monthly"
  81. }}</a-select-option>
  82. </a-select>
  83. </a-form-item>
  84. <a-form-item>
  85. <template slot="label">
  86. <a-tooltip>
  87. <template slot="title">
  88. <span>{{ i18n "pages.inbounds.leaveBlankToNeverExpire"
  89. }}</span>
  90. </template>
  91. {{ i18n "pages.inbounds.expireDate" }}
  92. <a-icon type="question-circle"></a-icon>
  93. </a-tooltip>
  94. </template>
  95. <a-date-picker :style="{ width: '100%' }"
  96. v-if="datepicker == 'gregorian'" :show-time="{ format: 'HH:mm:ss' }"
  97. format="YYYY-MM-DD HH:mm:ss"
  98. :dropdown-class-name="themeSwitcher.currentTheme"
  99. v-model="dbInbound._expiryTime"></a-date-picker>
  100. <a-persian-datepicker v-else
  101. placeholder='{{ i18n "pages.settings.datepickerPlaceholder" }}'
  102. value="dbInbound._expiryTime" v-model="dbInbound._expiryTime">
  103. </a-persian-datepicker>
  104. </a-form-item>
  105. </a-form>
  106. <!-- vmess settings -->
  107. <template v-if="inbound.protocol === Protocols.VMESS">
  108. {{template "form/vmess"}}
  109. </template>
  110. <!-- vless settings -->
  111. <template v-if="inbound.protocol === Protocols.VLESS">
  112. {{template "form/vless"}}
  113. </template>
  114. <!-- trojan settings -->
  115. <template v-if="inbound.protocol === Protocols.TROJAN">
  116. {{template "form/trojan"}}
  117. </template>
  118. <!-- shadowsocks -->
  119. <template v-if="inbound.protocol === Protocols.SHADOWSOCKS">
  120. {{template "form/shadowsocks"}}
  121. </template>
  122. <!-- tunnel -->
  123. <template v-if="inbound.protocol === Protocols.TUNNEL">
  124. {{template "form/tunnel"}}
  125. </template>
  126. <!-- mixed -->
  127. <template v-if="inbound.protocol === Protocols.MIXED">
  128. {{template "form/mixed"}}
  129. </template>
  130. <!-- http -->
  131. <template v-if="inbound.protocol === Protocols.HTTP">
  132. {{template "form/http"}}
  133. </template>
  134. <!-- wireguard -->
  135. <template v-if="inbound.protocol === Protocols.WIREGUARD">
  136. {{template "form/wireguard"}}
  137. </template>
  138. <!-- tun -->
  139. <template v-if="inbound.protocol === Protocols.TUN">
  140. {{template "form/tun"}}
  141. </template>
  142. <!-- hysteria -->
  143. <template v-if="inbound.protocol === Protocols.HYSTERIA">
  144. {{template "form/hysteria"}}
  145. </template>
  146. <!-- stream settings -->
  147. <template v-if="inbound.canEnableStream()">
  148. {{template "form/streamSettings"}}
  149. {{template "form/externalProxy" }}
  150. </template>
  151. <!-- tls settings -->
  152. <template v-if="inbound.canEnableTls()">
  153. {{template "form/tlsSettings"}}
  154. </template>
  155. <!-- sniffing -->
  156. <a-collapse>
  157. <a-collapse-panel header='Sniffing'>
  158. {{template "form/sniffing"}}
  159. </a-collapse-panel>
  160. </a-collapse>
  161. {{end}}