stream_settings.html 1.8 KB

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