1
0

shadowsocks.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. <a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
  24. <a-form-item label='{{ i18n "encryption" }}'>
  25. <a-select v-model="inbound.settings.method" @change="SSMethodChange" :dropdown-class-name="themeSwitcher.currentTheme">
  26. <a-select-option v-for="(method,method_name) in SSMethods" :value="method">[[ method_name ]]</a-select-option>
  27. </a-select>
  28. </a-form-item>
  29. <a-form-item v-if="inbound.isSS2022">
  30. <template slot="label">
  31. <a-tooltip>
  32. <template slot="title">
  33. <span>{{ i18n "reset" }}</span>
  34. </template> Password <a-icon @click="inbound.settings.password = RandomUtil.randomShadowsocksPassword()" type="sync"></a-icon>
  35. </a-tooltip>
  36. </template>
  37. <a-input v-model.trim="inbound.settings.password"></a-input>
  38. </a-form-item>
  39. <a-form-item label='{{ i18n "pages.inbounds.network" }}'>
  40. <a-select v-model="inbound.settings.network" style="width: 100px;" :dropdown-class-name="themeSwitcher.currentTheme">
  41. <a-select-option value="tcp,udp">TCP,UDP</a-select-option>
  42. <a-select-option value="tcp">TCP</a-select-option>
  43. <a-select-option value="udp">UDP</a-select-option>
  44. </a-select>
  45. </a-form-item>
  46. </a-form>
  47. {{end}}