shadowsocks.html 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. {{define "form/shadowsocks"}}
  2. <a-form layout="inline" style="padding: 10px 0px;">
  3. <template v-if="inbound.isSSMultiUser">
  4. <a-collapse activeKey="0" v-for="(client, index) in inbound.settings.shadowsockses.slice(0,1)" v-if="!isEdit">
  5. <a-collapse-panel header='{{ i18n "pages.inbounds.client" }}'>
  6. {{template "form/client"}}
  7. </a-collapse-panel>
  8. </a-collapse>
  9. <a-collapse v-else>
  10. <a-collapse-panel :header="'{{ i18n "pages.client.clientCount"}} : ' + inbound.settings.shadowsockses.length">
  11. <table width="100%">
  12. <tr class="client-table-header">
  13. <th>{{ i18n "pages.inbounds.email" }}</th>
  14. <th>Password</th>
  15. </tr>
  16. <tr v-for="(client, index) in inbound.settings.shadowsockses" :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>
  25. <a-form layout="inline">
  26. <a-form-item label='{{ i18n "encryption" }}'>
  27. <a-select v-model="inbound.settings.method" style="width: 250px;" :dropdown-class-name="themeSwitcher.currentTheme" @change="SSMethodChange">
  28. <a-select-option v-for="method in SSMethods" :value="method">[[ method ]]</a-select-option>
  29. </a-select>
  30. </a-form-item>
  31. <a-form-item v-if="inbound.isSS2022" label='{{ i18n "password" }}'>
  32. <a-icon @click="inbound.settings.password = RandomUtil.randomShadowsocksPassword()" type="sync"> </a-icon>
  33. <a-input v-model.trim="inbound.settings.password" style="width: 250px;"></a-input>
  34. </a-form-item>
  35. <a-form-item label='{{ i18n "pages.inbounds.network" }}'>
  36. <a-select v-model="inbound.settings.network" style="width: 100px;" :dropdown-class-name="themeSwitcher.currentTheme">
  37. <a-select-option value="tcp,udp">TCP+UDP</a-select-option>
  38. <a-select-option value="tcp">TCP</a-select-option>
  39. <a-select-option value="udp">UDP</a-select-option>
  40. </a-select>
  41. </a-form-item>
  42. </a-form>
  43. {{end}}