shadowsocks.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. {{define "form/shadowsocks"}}
  2. <template v-if="inbound.isSSMultiUser">
  3. <a-collapse
  4. activeKey="0"
  5. v-for="(client, index) in inbound.settings.shadowsockses.slice(0,1)"
  6. v-if="!isEdit"
  7. >
  8. <a-collapse-panel header='{{ i18n "pages.inbounds.client" }}'>
  9. {{template "form/client"}}
  10. </a-collapse-panel>
  11. </a-collapse>
  12. <a-collapse v-else>
  13. <a-collapse-panel :header="'{{ i18n "pages.client.clientCount"}} : ' + inbound.settings.shadowsockses.length">
  14. <table width="100%">
  15. <tr class="client-table-header">
  16. <th>{{ i18n "pages.inbounds.email" }}</th>
  17. <th>Password</th>
  18. </tr>
  19. <tr
  20. v-for="(client, index) in inbound.settings.shadowsockses"
  21. :class="index % 2 == 1 ? ' client-table-odd-row' : ''"
  22. >
  23. <td>[[ client.email ]]</td>
  24. <td>[[ client.password ]]</td>
  25. </tr>
  26. </table>
  27. </a-collapse-panel>
  28. </a-collapse>
  29. </template>
  30. <a-form
  31. :colon=" false"
  32. :label-col="{ md: {span:8} }"
  33. :wrapper-col="{ md: {span:14} }"
  34. >
  35. <a-form-item label='{{ i18n "encryption" }}'>
  36. <a-select
  37. v-model="inbound.settings.method"
  38. @change="SSMethodChange"
  39. :dropdown-class-name="themeSwitcher.currentTheme"
  40. >
  41. <a-select-option v-for="(method,method_name) in SSMethods" :value="method"
  42. >[[ method_name ]]</a-select-option
  43. >
  44. </a-select>
  45. </a-form-item>
  46. <a-form-item v-if="inbound.isSS2022">
  47. <template slot="label">
  48. <a-tooltip>
  49. <template slot="title">
  50. <span>{{ i18n "reset" }}</span>
  51. </template>
  52. Password
  53. <a-icon
  54. @click="inbound.settings.password = RandomUtil.randomShadowsocksPassword(inbound.settings.method)"
  55. type="sync"
  56. ></a-icon>
  57. </a-tooltip>
  58. </template>
  59. <a-input v-model.trim="inbound.settings.password"></a-input>
  60. </a-form-item>
  61. <a-form-item label='{{ i18n "pages.inbounds.network" }}'>
  62. <a-select
  63. v-model="inbound.settings.network"
  64. :style="{ width: '100px' }"
  65. :dropdown-class-name="themeSwitcher.currentTheme"
  66. >
  67. <a-select-option value="tcp,udp">TCP,UDP</a-select-option>
  68. <a-select-option value="tcp">TCP</a-select-option>
  69. <a-select-option value="udp">UDP</a-select-option>
  70. </a-select>
  71. </a-form-item>
  72. <a-form-item label="ivCheck">
  73. <a-switch v-model="inbound.settings.ivCheck"></a-switch>
  74. </a-form-item>
  75. </a-form>
  76. {{end}}