1
0

inbound.html 3.5 KB

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