1
0

socks.html 1.7 KB

123456789101112131415161718192021222324252627282930313233343536
  1. {{define "form/mixed"}}
  2. <a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
  3. <a-form-item label='{{ i18n "pages.inbounds.enable" }} UDP'>
  4. <a-switch v-model="inbound.settings.udp"></a-switch>
  5. </a-form-item>
  6. <a-form-item label="IP" v-if="inbound.settings.udp">
  7. <a-input v-model.trim="inbound.settings.ip"></a-input>
  8. </a-form-item>
  9. <a-form-item label='{{ i18n "password" }}'>
  10. <a-switch :checked="inbound.settings.auth === 'password'"
  11. @change="checked => inbound.settings.auth = checked ? 'password' : 'noauth'"></a-switch>
  12. </a-form-item>
  13. <template v-if="inbound.settings.auth === 'password'">
  14. <table :style="{ width: '100%', textAlign: 'center', margin: '1rem 0' }">
  15. <tr>
  16. <td width="45%">{{ i18n "username" }}</td>
  17. <td width="45%">{{ i18n "password" }}</td>
  18. <td>
  19. <a-button icon="plus" size="small"
  20. @click="inbound.settings.addAccount(new Inbound.MixedSettings.SocksAccount())"></a-button>
  21. </td>
  22. </tr>
  23. </table>
  24. <a-input-group compact v-for="(account, index) in inbound.settings.accounts" :style="{ marginBottom: '10px' }">
  25. <a-input :style="{ width: '50%' }" v-model.trim="account.user" placeholder='{{ i18n "username" }}'>
  26. <template slot="addonBefore" :style="{ margin: '0' }">[[ index+1 ]]</template>
  27. </a-input>
  28. <a-input :style="{ width: '50%' }" v-model.trim="account.pass" placeholder='{{ i18n "password" }}'>
  29. <template slot="addonAfter">
  30. <a-button icon="minus" size="small" @click="inbound.settings.delAccount(index)"></a-button>
  31. </template>
  32. </a-input>
  33. </a-input-group>
  34. </template>
  35. </a-form>
  36. {{end}}