inbound.html 3.5 KB

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