trojan.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. {{define "form/trojan"}}
  2. <a-collapse activeKey="0" v-for="(client, index) in inbound.settings.trojans.slice(0,1)" v-if="!isEdit">
  3. <a-collapse-panel header='{{ i18n "pages.inbounds.client" }}'>
  4. {{template "form/client"}}
  5. </a-collapse-panel>
  6. </a-collapse>
  7. <a-collapse v-else>
  8. <a-collapse-panel :header="'{{ i18n "pages.client.clientCount"}} : ' + inbound.settings.trojans.length">
  9. <table width="100%">
  10. <tr class="client-table-header">
  11. <th>{{ i18n "pages.inbounds.email" }}</th>
  12. <th>Password</th>
  13. </tr>
  14. <tr v-for="(client, index) in inbound.settings.trojans" :class="index % 2 == 1 ? 'client-table-odd-row' : ''">
  15. <td>[[ client.email ]]</td>
  16. <td>[[ client.password ]]</td>
  17. </tr>
  18. </table>
  19. </a-collapse-panel>
  20. </a-collapse>
  21. <template v-if="inbound.isTcp && !inbound.stream.isReality">
  22. <a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
  23. <a-form-item label="Fallbacks">
  24. <a-button icon="plus" type="primary" size="small" @click="inbound.settings.addFallback()"></a-button>
  25. </a-form-item>
  26. </a-form>
  27. <!-- trojan fallbacks -->
  28. <a-form v-for="(fallback, index) in inbound.settings.fallbacks" :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
  29. <a-divider style="margin:0;"> Fallback [[ index + 1 ]] <a-icon type="delete" @click="() => inbound.settings.delFallback(index)" style="color: rgb(255, 77, 79);cursor: pointer;"></a-icon>
  30. </a-divider>
  31. <a-form-item label='SNI'>
  32. <a-input v-model="fallback.name"></a-input>
  33. </a-form-item>
  34. <a-form-item label='ALPN'>
  35. <a-input v-model="fallback.alpn"></a-input>
  36. </a-form-item>
  37. <a-form-item label='Path'>
  38. <a-input v-model="fallback.path"></a-input>
  39. </a-form-item>
  40. <a-form-item label='Dest'>
  41. <a-input v-model="fallback.dest"></a-input>
  42. </a-form-item>
  43. <a-form-item label='xVer'>
  44. <a-input-number v-model="fallback.xver" :min="0" :max="2"></a-input-number>
  45. </a-form-item>
  46. </a-form>
  47. <a-divider style="margin:5px 0;"></a-divider>
  48. </template>
  49. {{end}}