inbound.html 5.9 KB

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