stream_settings.html 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. {{define "form/streamSettings"}}
  2. <!-- select stream network -->
  3. <a-form :colon="false" :label-col="{ md: {span:8} }"
  4. :wrapper-col="{ md: {span:14} }"
  5. v-if="inbound.protocol != Protocols.HYSTERIA">
  6. <a-form-item label='{{ i18n "transmission" }}'>
  7. <a-select v-model="inbound.stream.network" :style="{ width: '75%' }"
  8. @change="streamNetworkChange"
  9. :dropdown-class-name="themeSwitcher.currentTheme">
  10. <a-select-option value="tcp">TCP (RAW)</a-select-option>
  11. <a-select-option value="kcp">mKCP</a-select-option>
  12. <a-select-option value="ws">WebSocket</a-select-option>
  13. <a-select-option value="grpc">gRPC</a-select-option>
  14. <a-select-option value="httpupgrade">HTTPUpgrade</a-select-option>
  15. <a-select-option value="xhttp">XHTTP</a-select-option>
  16. </a-select>
  17. </a-form-item>
  18. </a-form>
  19. <!-- tcp -->
  20. <template v-if="inbound.stream.network === 'tcp'">
  21. {{template "form/streamTCP"}}
  22. </template>
  23. <!-- kcp -->
  24. <template v-if="inbound.stream.network === 'kcp'">
  25. {{template "form/streamKCP"}}
  26. </template>
  27. <!-- ws -->
  28. <template v-if="inbound.stream.network === 'ws'">
  29. {{template "form/streamWS"}}
  30. </template>
  31. <!-- grpc -->
  32. <template v-if="inbound.stream.network === 'grpc'">
  33. {{template "form/streamGRPC"}}
  34. </template>
  35. <!-- hysteria -->
  36. <template v-if="inbound.stream.network === 'hysteria'">
  37. {{template "form/streamHysteria"}}
  38. </template>
  39. <!-- httpupgrade -->
  40. <template v-if="inbound.stream.network === 'httpupgrade'">
  41. {{template "form/streamHTTPUpgrade"}}
  42. </template>
  43. <!-- xhttp -->
  44. <template v-if="inbound.stream.network === 'xhttp'">
  45. {{template "form/streamXHTTP"}}
  46. </template>
  47. <!-- sockopt -->
  48. <template>
  49. {{template "form/streamSockopt"}}
  50. </template>
  51. <!-- finalmask - only for TCP, WS, HTTPUpgrade, XHTTP, mKCP -->
  52. <template
  53. v-if="['tcp', 'ws', 'httpupgrade', 'xhttp', 'kcp'].includes(inbound.stream.network)">
  54. {{template "form/streamFinalMask"}}
  55. </template>
  56. {{end}}