trojan.html 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. {{define "form/trojan"}}
  2. <a-form layout="inline" style="padding: 10px 0px;">
  3. <a-collapse activeKey="0" v-for="(client, index) in inbound.settings.trojans.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.trojans.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.trojans" :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. </a-form>
  23. <template v-if="inbound.isTcp">
  24. <a-form layout="inline">
  25. <a-form-item label="Fallbacks">
  26. <a-row>
  27. <a-button type="primary" size="small" @click="inbound.settings.addFallback()">
  28. +
  29. </a-button>
  30. </a-row>
  31. </a-form-item>
  32. </a-form>
  33. <!-- trojan fallbacks -->
  34. <a-form v-for="(fallback, index) in inbound.settings.fallbacks" layout="inline">
  35. <a-divider style="margin:0;">
  36. fallback[[ index + 1 ]]
  37. <a-icon type="delete" @click="() => inbound.settings.delFallback(index)"
  38. style="color: rgb(255, 77, 79);cursor: pointer;"/>
  39. </a-divider>
  40. <table width="100%">
  41. <tr>
  42. <td style="width: 20%;">Name</td>
  43. <td>
  44. <a-form-item>
  45. <a-input v-model="fallback.name" style="width: 250px"></a-input>
  46. </a-form-item>
  47. </td>
  48. </tr>
  49. <tr>
  50. <td>Alpn</td>
  51. <td>
  52. <a-form-item>
  53. <a-input v-model="fallback.alpn" style="width: 250px"></a-input>
  54. </a-form-item>
  55. </td>
  56. </tr>
  57. <tr>
  58. <td>Path</td>
  59. <td>
  60. <a-form-item>
  61. <a-input v-model="fallback.path" style="width: 250px"></a-input>
  62. </a-form-item>
  63. </td>
  64. </tr>
  65. <tr>
  66. <td>Dest</td>
  67. <td>
  68. <a-form-item>
  69. <a-input v-model="fallback.dest" style="width: 250px"></a-input>
  70. </a-form-item>
  71. </td>
  72. </tr>
  73. <tr>
  74. <td>xVer</td>
  75. <td>
  76. <a-form-item>
  77. <a-input-number v-model="fallback.xver" :min="0" :max="2"></a-input-number>
  78. </a-form-item>
  79. </td>
  80. </tr>
  81. </table>
  82. </a-form>
  83. <a-divider style="margin:0;"></a-divider>
  84. </template>
  85. {{end}}