1
0

shadowsocks.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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"
  16. :class="index % 2 == 1 ? ' client-table-odd-row' : ''">
  17. <td>[[ client.email ]]</td>
  18. <td>[[ client.password ]]</td>
  19. </tr>
  20. </table>
  21. </a-collapse-panel>
  22. </a-collapse>
  23. </template>
  24. <a-form :colon=" false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
  25. <a-form-item label='{{ i18n "encryption" }}'>
  26. <a-select v-model="inbound.settings.method" @change="SSMethodChange"
  27. :dropdown-class-name="themeSwitcher.currentTheme">
  28. <a-select-option v-for="(method,method_name) in SSMethods" :value="method">[[ method_name ]]</a-select-option>
  29. </a-select>
  30. </a-form-item>
  31. <a-form-item v-if="inbound.isSS2022">
  32. <template slot="label">
  33. <a-tooltip>
  34. <template slot="title">
  35. <span>{{ i18n "reset" }}</span>
  36. </template>
  37. Password
  38. <a-icon @click="inbound.settings.password = RandomUtil.randomShadowsocksPassword(inbound.settings.method)"
  39. type="sync"></a-icon>
  40. </a-tooltip>
  41. </template>
  42. <a-input v-model.trim="inbound.settings.password"></a-input>
  43. </a-form-item>
  44. <a-form-item label='{{ i18n "pages.inbounds.network" }}'>
  45. <a-select v-model="inbound.settings.network" :style="{ width: '100px' }"
  46. :dropdown-class-name="themeSwitcher.currentTheme">
  47. <a-select-option value="tcp,udp">TCP,UDP</a-select-option>
  48. <a-select-option value="tcp">TCP</a-select-option>
  49. <a-select-option value="udp">UDP</a-select-option>
  50. </a-select>
  51. </a-form-item>
  52. <a-form-item label="ivCheck">
  53. <a-switch v-model="inbound.settings.ivCheck"></a-switch>
  54. </a-form-item>
  55. </a-form>
  56. {{end}}