stream_hysteria.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. {{define "form/streamHysteria"}}
  2. <a-form
  3. :colon="false"
  4. :label-col="{ md: {span:8} }"
  5. :wrapper-col="{ md: {span:14} }"
  6. >
  7. <a-form-item label="UDP Idle Timeout">
  8. <a-input-number
  9. v-model.number="inbound.stream.hysteria.udpIdleTimeout"
  10. :min="0"
  11. ></a-input-number>
  12. </a-form-item>
  13. <a-form-item label="Masquerade">
  14. <a-switch v-model="inbound.stream.hysteria.masqueradeSwitch"></a-switch>
  15. </a-form-item>
  16. <template v-if="inbound.stream.hysteria.masqueradeSwitch">
  17. <a-divider :style="{ margin: '5px 0 0' }">Masquerade</a-divider>
  18. <a-form-item label="Type">
  19. <a-select
  20. v-model="inbound.stream.hysteria.masquerade.type"
  21. :dropdown-class-name="themeSwitcher.currentTheme"
  22. >
  23. <a-select-option value="file">File</a-select-option>
  24. <a-select-option value="proxy">Proxy</a-select-option>
  25. <a-select-option value="string">String</a-select-option>
  26. </a-select>
  27. </a-form-item>
  28. <a-form-item
  29. label="Dir"
  30. v-if="inbound.stream.hysteria.masquerade.type === 'file'"
  31. >
  32. <a-input v-model.trim="inbound.stream.hysteria.masquerade.dir"></a-input>
  33. </a-form-item>
  34. <template v-if="inbound.stream.hysteria.masquerade.type === 'proxy'">
  35. <a-form-item label="URL">
  36. <a-input
  37. v-model.trim="inbound.stream.hysteria.masquerade.url"
  38. ></a-input>
  39. </a-form-item>
  40. <a-form-item label="Rewrite Host">
  41. <a-switch
  42. v-model="inbound.stream.hysteria.masquerade.rewriteHost"
  43. ></a-switch>
  44. </a-form-item>
  45. <a-form-item label="Insecure">
  46. <a-switch
  47. v-model="inbound.stream.hysteria.masquerade.insecure"
  48. ></a-switch>
  49. </a-form-item>
  50. </template>
  51. <template v-if="inbound.stream.hysteria.masquerade.type === 'string'">
  52. <a-form-item label="Content">
  53. <a-input
  54. v-model.trim="inbound.stream.hysteria.masquerade.content"
  55. ></a-input>
  56. </a-form-item>
  57. <a-form-item label='{{ i18n "pages.inbounds.stream.tcp.requestHeader" }}'>
  58. <a-button
  59. size="small"
  60. @click="inbound.stream.hysteria.masquerade.addHeader('', '')"
  61. >+</a-button
  62. >
  63. </a-form-item>
  64. <a-form-item :wrapper-col="{span:24}">
  65. <a-input-group
  66. compact
  67. v-for="(header, index) in inbound.stream.hysteria.masquerade.headers"
  68. >
  69. <a-input
  70. style="width: 50%"
  71. v-model.trim="header.name"
  72. placeholder='{{ i18n "pages.inbounds.stream.general.name"}}'
  73. >
  74. <template slot="addonBefore" style="margin: 0"
  75. >[[ index+1 ]]</template
  76. >
  77. </a-input>
  78. <a-input
  79. style="width: 50%"
  80. v-model.trim="header.value"
  81. placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'
  82. >
  83. <a-button
  84. slot="addonAfter"
  85. size="small"
  86. @click="inbound.stream.hysteria.masquerade.removeHeader(index)"
  87. >-</a-button
  88. >
  89. </a-input>
  90. </a-input-group>
  91. </a-form-item>
  92. <a-form-item label="Status Code">
  93. <a-input-number
  94. v-model.number="inbound.stream.hysteria.masquerade.statusCode"
  95. ></a-input-number>
  96. </a-form-item>
  97. </template>
  98. </template>
  99. </a-form>
  100. {{end}}