1
0

inbound.html 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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" }}</a-select-option>
  73. <a-select-option value="daily">{{ i18n
  74. "pages.inbounds.periodicTrafficReset.daily" }}</a-select-option>
  75. <a-select-option value="weekly">{{ i18n
  76. "pages.inbounds.periodicTrafficReset.weekly"
  77. }}</a-select-option>
  78. <a-select-option value="monthly">{{ i18n
  79. "pages.inbounds.periodicTrafficReset.monthly"
  80. }}</a-select-option>
  81. </a-select>
  82. </a-form-item>
  83. <a-form-item>
  84. <template slot="label">
  85. <a-tooltip>
  86. <template slot="title">
  87. <span>{{ i18n "pages.inbounds.leaveBlankToNeverExpire"
  88. }}</span>
  89. </template>
  90. {{ i18n "pages.inbounds.expireDate" }}
  91. <a-icon type="question-circle"></a-icon>
  92. </a-tooltip>
  93. </template>
  94. <a-date-picker :style="{ width: '100%' }"
  95. v-if="datepicker == 'gregorian'" :show-time="{ format: 'HH:mm:ss' }"
  96. format="YYYY-MM-DD HH:mm:ss"
  97. :dropdown-class-name="themeSwitcher.currentTheme"
  98. v-model="dbInbound._expiryTime"></a-date-picker>
  99. <a-persian-datepicker v-else
  100. placeholder='{{ i18n "pages.settings.datepickerPlaceholder" }}'
  101. value="dbInbound._expiryTime" v-model="dbInbound._expiryTime">
  102. </a-persian-datepicker>
  103. </a-form-item>
  104. </a-form>
  105. <!-- vmess settings -->
  106. <template v-if="inbound.protocol === Protocols.VMESS">
  107. {{template "form/vmess"}}
  108. </template>
  109. <!-- vless settings -->
  110. <template v-if="inbound.protocol === Protocols.VLESS">
  111. {{template "form/vless"}}
  112. </template>
  113. <!-- trojan settings -->
  114. <template v-if="inbound.protocol === Protocols.TROJAN">
  115. {{template "form/trojan"}}
  116. </template>
  117. <!-- shadowsocks -->
  118. <template v-if="inbound.protocol === Protocols.SHADOWSOCKS">
  119. {{template "form/shadowsocks"}}
  120. </template>
  121. <!-- tunnel -->
  122. <template v-if="inbound.protocol === Protocols.TUNNEL">
  123. {{template "form/tunnel"}}
  124. </template>
  125. <!-- mixed -->
  126. <template v-if="inbound.protocol === Protocols.MIXED">
  127. {{template "form/mixed"}}
  128. </template>
  129. <!-- http -->
  130. <template v-if="inbound.protocol === Protocols.HTTP">
  131. {{template "form/http"}}
  132. </template>
  133. <!-- wireguard -->
  134. <template v-if="inbound.protocol === Protocols.WIREGUARD">
  135. {{template "form/wireguard"}}
  136. </template>
  137. <!-- tun -->
  138. <template v-if="inbound.protocol === Protocols.TUN">
  139. {{template "form/tun"}}
  140. </template>
  141. <!-- stream settings -->
  142. <template v-if="inbound.canEnableStream()">
  143. {{template "form/streamSettings"}}
  144. {{template "form/externalProxy" }}
  145. </template>
  146. <!-- tls settings -->
  147. <template v-if="inbound.canEnableTls()">
  148. {{template "form/tlsSettings"}}
  149. </template>
  150. <!-- sniffing -->
  151. <a-collapse>
  152. <a-collapse-panel header='Sniffing'>
  153. {{template "form/sniffing"}}
  154. </a-collapse-panel>
  155. </a-collapse>
  156. {{end}}