socks.html 1.5 KB

123456789101112131415161718192021222324252627282930313233
  1. {{define "form/socks"}}
  2. <a-form layout="inline">
  3. <a-form-item label='{{ i18n "password" }}'>
  4. <a-switch :checked="inbound.settings.auth === 'password'"
  5. @change="checked => inbound.settings.auth = checked ? 'password' : 'noauth'"></a-switch>
  6. </a-form-item>
  7. <br>
  8. <template v-if="inbound.settings.auth === 'password'">
  9. <a-form-item>
  10. <a-row>
  11. <a-button type="primary" size="small" @click="inbound.settings.addAccount(new Inbound.SocksSettings.SocksAccount())">+</a-button>
  12. </a-row>
  13. <a-input-group v-for="(account, index) in inbound.settings.accounts">
  14. <a-input style="width: 45%" v-model.trim="account.user"
  15. addon-before='{{ i18n "username" }}'></a-input>
  16. <a-input style="width: 55%" v-model.trim="account.pass"
  17. addon-before='{{ i18n "password" }}'>
  18. <template slot="addonAfter">
  19. <a-button type="primary" size="small" @click="inbound.settings.delAccount(index)">-</a-button>
  20. </template>
  21. </a-input>
  22. </a-input-group>
  23. </a-form-item>
  24. </template>
  25. <br>
  26. <a-form-item label='{{ i18n "pages.inbounds.enable" }} udp'>
  27. <a-switch v-model="inbound.settings.udp"></a-switch>
  28. </a-form-item>
  29. <a-form-item v-if="inbound.settings.udp" label="IP">
  30. <a-input v-model.trim="inbound.settings.ip"></a-input>
  31. </a-form-item>
  32. </a-form>
  33. {{end}}