inbound.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. {{define "form/inbound"}}
  2. <!-- base -->
  3. <a-form layout="inline">
  4. <table width="100%" class="ant-table-tbody">
  5. <tr>
  6. <td>{{ i18n "enable" }}</td>
  7. <td>
  8. <a-form-item>
  9. <a-switch v-model="dbInbound.enable"></a-switch>
  10. </a-form-item>
  11. </td>
  12. </tr>
  13. <tr>
  14. <td>{{ i18n "remark" }}</td>
  15. <td>
  16. <a-form-item>
  17. <a-input v-model.trim="dbInbound.remark" style="width: 250px;"></a-input>
  18. </a-form-item>
  19. </td>
  20. </tr>
  21. <tr>
  22. <td>{{ i18n "protocol" }}</td>
  23. <td>
  24. <a-form-item>
  25. <a-select v-model="inbound.protocol" style="width: 250px;" :disabled="isEdit" :dropdown-class-name="themeSwitcher.currentTheme">
  26. <a-select-option v-for="p in Protocols" :key="p" :value="p">[[ p ]]</a-select-option>
  27. </a-select>
  28. </a-form-item>
  29. </td>
  30. </tr>
  31. <tr>
  32. <td>{{ i18n "monitor" }}
  33. <a-tooltip>
  34. <template slot="title">
  35. <span>{{ i18n "pages.inbounds.monitorDesc" }}</span>
  36. </template>
  37. <a-icon type="question-circle" theme="filled"></a-icon>
  38. </a-tooltip>
  39. </td>
  40. <td>
  41. <a-form-item>
  42. <a-input v-model.trim="inbound.listen" style="width: 250px;"></a-input>
  43. </a-form-item>
  44. </td>
  45. </tr>
  46. <tr>
  47. <td>{{ i18n "pages.inbounds.port" }}</td>
  48. <td>
  49. <a-form-item>
  50. <a-input-number v-model.number="inbound.port"></a-input-number>
  51. </a-form-item>
  52. </td>
  53. </tr>
  54. <tr>
  55. <td>
  56. <span>{{ i18n "pages.inbounds.totalFlow" }}</span>(GB)
  57. <a-tooltip>
  58. <template slot="title">
  59. 0 <span>{{ i18n "pages.inbounds.meansNoLimit" }}</span>
  60. </template>
  61. <a-icon type="question-circle" theme="filled"></a-icon>
  62. </a-tooltip>
  63. </td>
  64. <td>
  65. <a-form-item>
  66. <a-input-number v-model="dbInbound.totalGB" :min="0"></a-input-number>
  67. </a-form-item>
  68. </td>
  69. </tr>
  70. <tr>
  71. <td>
  72. <span>{{ i18n "pages.inbounds.expireDate" }}</span>
  73. <a-tooltip>
  74. <template slot="title">
  75. <span>{{ i18n "pages.inbounds.leaveBlankToNeverExpire" }}</span>
  76. </template>
  77. <a-icon type="question-circle" theme="filled"></a-icon>
  78. </a-tooltip>
  79. </td>
  80. <td>
  81. <a-form-item>
  82. <a-date-picker :show-time="{ format: 'HH:mm:ss' }" format="YYYY-MM-DD HH:mm:ss"
  83. :dropdown-class-name="themeSwitcher.currentTheme"
  84. v-model="dbInbound._expiryTime" style="width: 250px;"></a-date-picker>
  85. </a-form-item>
  86. </td>
  87. </tr>
  88. </table>
  89. </a-form>
  90. <!-- vmess settings -->
  91. <template v-if="inbound.protocol === Protocols.VMESS">
  92. {{template "form/vmess"}}
  93. </template>
  94. <!-- vless settings -->
  95. <template v-if="inbound.protocol === Protocols.VLESS">
  96. {{template "form/vless"}}
  97. </template>
  98. <!-- trojan settings -->
  99. <template v-if="inbound.protocol === Protocols.TROJAN">
  100. {{template "form/trojan"}}
  101. </template>
  102. <!-- shadowsocks -->
  103. <template v-if="inbound.protocol === Protocols.SHADOWSOCKS">
  104. {{template "form/shadowsocks"}}
  105. </template>
  106. <!-- dokodemo-door -->
  107. <template v-if="inbound.protocol === Protocols.DOKODEMO">
  108. {{template "form/dokodemo"}}
  109. </template>
  110. <!-- socks -->
  111. <template v-if="inbound.protocol === Protocols.SOCKS">
  112. {{template "form/socks"}}
  113. </template>
  114. <!-- http -->
  115. <template v-if="inbound.protocol === Protocols.HTTP">
  116. {{template "form/http"}}
  117. </template>
  118. <!-- stream settings -->
  119. <template v-if="inbound.canEnableStream()">
  120. {{template "form/streamSettings"}}
  121. {{template "form/externalProxy" }}
  122. </template>
  123. <!-- tls settings -->
  124. <template v-if="inbound.canEnableTls()">
  125. {{template "form/tlsSettings"}}
  126. </template>
  127. <!-- sniffing -->
  128. <template v-if="inbound.canSniffing()">
  129. {{template "form/sniffing"}}
  130. </template>
  131. {{end}}