shadowsocks.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. {{define "form/shadowsocks"}}
  2. <template v-if="inbound.isSSMultiUser">
  3. <a-collapse activeKey="0" v-for="(client, index) in inbound.settings.shadowsockses.slice(0,1)" v-if="!isEdit">
  4. <a-collapse-panel header='{{ i18n "pages.inbounds.client" }}'>
  5. {{template "form/client"}}
  6. </a-collapse-panel>
  7. </a-collapse>
  8. <a-collapse v-else>
  9. <a-collapse-panel :header="'{{ i18n "pages.client.clientCount"}} : ' + inbound.settings.shadowsockses.length">
  10. <table width="100%">
  11. <tr class="client-table-header">
  12. <th>{{ i18n "pages.inbounds.email" }}</th>
  13. <th>Password</th>
  14. </tr>
  15. <tr v-for="(client, index) in inbound.settings.shadowsockses" :class="index % 2 == 1 ? 'client-table-odd-row' : ''">
  16. <td>[[ client.email ]]</td>
  17. <td>[[ client.password ]]</td>
  18. </tr>
  19. </table>
  20. </a-collapse-panel>
  21. </a-collapse>
  22. </template>
  23. <table width="100%" class="ant-table-tbody">
  24. <tr>
  25. <td>{{ i18n "encryption" }}</td>
  26. <td>
  27. <a-form-item>
  28. <a-select v-model="inbound.settings.method" style="width: 250px;" @change="SSMethodChange" :dropdown-class-name="themeSwitcher.currentTheme">
  29. <a-select-option v-for="method in SSMethods" :value="method">[[ method ]]</a-select-option>
  30. </a-select>
  31. </a-form-item>
  32. </td>
  33. </tr>
  34. <tr v-if="inbound.isSS2022">
  35. <td>{{ i18n "password" }}
  36. <a-icon @click="inbound.settings.password = RandomUtil.randomShadowsocksPassword()" type="sync"> </a-icon>
  37. </td>
  38. <td>
  39. <a-form-item>
  40. <a-input v-model.trim="inbound.settings.password" style="width: 250px"></a-input>
  41. </a-form-item>
  42. </td>
  43. </tr>
  44. <tr>
  45. <td>{{ i18n "pages.inbounds.network" }}</td>
  46. <td>
  47. <a-form-item>
  48. <a-select v-model="inbound.settings.network" style="width: 100px;" :dropdown-class-name="themeSwitcher.currentTheme">
  49. <a-select-option value="tcp,udp">tcp+udp</a-select-option>
  50. <a-select-option value="tcp">tcp</a-select-option>
  51. <a-select-option value="udp">udp</a-select-option>
  52. </a-select>
  53. </a-form-item>
  54. </td>
  55. </tr>
  56. </table>
  57. {{end}}