stream_xhttp.html 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. {{define "form/streamXHTTP"}}
  2. <a-form
  3. :colon="false"
  4. :label-col="{ md: {span:8} }"
  5. :wrapper-col="{ md: {span:14} }"
  6. >
  7. <a-form-item label='{{ i18n "host" }}'>
  8. <a-input v-model.trim="inbound.stream.xhttp.host"></a-input>
  9. </a-form-item>
  10. <a-form-item label='{{ i18n "path" }}'>
  11. <a-input v-model.trim="inbound.stream.xhttp.path"></a-input>
  12. </a-form-item>
  13. <a-form-item label='{{ i18n "pages.inbounds.stream.tcp.requestHeader" }}'>
  14. <a-button
  15. icon="plus"
  16. size="small"
  17. @click="inbound.stream.xhttp.addHeader('', '')"
  18. ></a-button>
  19. </a-form-item>
  20. <a-form-item :wrapper-col="{span:24}">
  21. <a-input-group
  22. compact
  23. v-for="(header, index) in inbound.stream.xhttp.headers"
  24. >
  25. <a-input
  26. :style="{ width: '50%' }"
  27. v-model.trim="header.name"
  28. placeholder='{{ i18n "pages.inbounds.stream.general.name"}}'
  29. >
  30. <template slot="addonBefore" :style="{ margin: '0' }"
  31. >[[ index+1 ]]</template
  32. >
  33. </a-input>
  34. <a-input
  35. :style="{ width: '50%' }"
  36. v-model.trim="header.value"
  37. placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'
  38. >
  39. <a-button
  40. icon="minus"
  41. slot="addonAfter"
  42. size="small"
  43. @click="inbound.stream.xhttp.removeHeader(index)"
  44. ></a-button>
  45. </a-input>
  46. </a-input-group>
  47. </a-form-item>
  48. <a-form-item label="Mode">
  49. <a-select
  50. v-model="inbound.stream.xhttp.mode"
  51. :style="{ width: '50%' }"
  52. :dropdown-class-name="themeSwitcher.currentTheme"
  53. >
  54. <a-select-option v-for="key in MODE_OPTION" :value="key"
  55. >[[ key ]]</a-select-option
  56. >
  57. </a-select>
  58. </a-form-item>
  59. <a-form-item
  60. label="Max Buffered Upload"
  61. v-if="inbound.stream.xhttp.mode === 'packet-up'"
  62. >
  63. <a-input-number
  64. v-model.number="inbound.stream.xhttp.scMaxBufferedPosts"
  65. ></a-input-number>
  66. </a-form-item>
  67. <a-form-item
  68. label="Max Upload Size (Byte)"
  69. v-if="inbound.stream.xhttp.mode === 'packet-up'"
  70. >
  71. <a-input v-model.trim="inbound.stream.xhttp.scMaxEachPostBytes"></a-input>
  72. </a-form-item>
  73. <a-form-item
  74. label="Stream-Up Server"
  75. v-if="inbound.stream.xhttp.mode === 'stream-up'"
  76. >
  77. <a-input v-model.trim="inbound.stream.xhttp.scStreamUpServerSecs"></a-input>
  78. </a-form-item>
  79. <a-form-item label="Padding Bytes">
  80. <a-input v-model.trim="inbound.stream.xhttp.xPaddingBytes"></a-input>
  81. </a-form-item>
  82. <a-form-item label="Padding Obfs Mode">
  83. <a-switch v-model="inbound.stream.xhttp.xPaddingObfsMode"></a-switch>
  84. </a-form-item>
  85. <template v-if="inbound.stream.xhttp.xPaddingObfsMode">
  86. <a-form-item label="Padding Key">
  87. <a-input
  88. v-model.trim="inbound.stream.xhttp.xPaddingKey"
  89. placeholder="x_padding"
  90. ></a-input>
  91. </a-form-item>
  92. <a-form-item label="Padding Header">
  93. <a-input
  94. v-model.trim="inbound.stream.xhttp.xPaddingHeader"
  95. placeholder="X-Padding"
  96. ></a-input>
  97. </a-form-item>
  98. <a-form-item label="Padding Placement">
  99. <a-select
  100. v-model="inbound.stream.xhttp.xPaddingPlacement"
  101. :dropdown-class-name="themeSwitcher.currentTheme"
  102. >
  103. <a-select-option value>Default (queryInHeader)</a-select-option>
  104. <a-select-option value="queryInHeader">queryInHeader</a-select-option>
  105. <a-select-option value="header">header</a-select-option>
  106. <a-select-option value="cookie">cookie</a-select-option>
  107. <a-select-option value="query">query</a-select-option>
  108. </a-select>
  109. </a-form-item>
  110. <a-form-item label="Padding Method">
  111. <a-select
  112. v-model="inbound.stream.xhttp.xPaddingMethod"
  113. :dropdown-class-name="themeSwitcher.currentTheme"
  114. >
  115. <a-select-option value>Default (repeat-x)</a-select-option>
  116. <a-select-option value="repeat-x">repeat-x</a-select-option>
  117. <a-select-option value="tokenish">tokenish</a-select-option>
  118. </a-select>
  119. </a-form-item>
  120. </template>
  121. <a-form-item label="Uplink HTTP Method">
  122. <a-select
  123. v-model="inbound.stream.xhttp.uplinkHTTPMethod"
  124. :dropdown-class-name="themeSwitcher.currentTheme"
  125. >
  126. <a-select-option value>Default (POST)</a-select-option>
  127. <a-select-option value="POST">POST</a-select-option>
  128. <a-select-option value="PUT">PUT</a-select-option>
  129. <a-select-option value="GET">GET (packet-up only)</a-select-option>
  130. </a-select>
  131. </a-form-item>
  132. <a-form-item label="Session Placement">
  133. <a-select
  134. v-model="inbound.stream.xhttp.sessionPlacement"
  135. :dropdown-class-name="themeSwitcher.currentTheme"
  136. >
  137. <a-select-option value>Default (path)</a-select-option>
  138. <a-select-option value="path">path</a-select-option>
  139. <a-select-option value="header">header</a-select-option>
  140. <a-select-option value="cookie">cookie</a-select-option>
  141. <a-select-option value="query">query</a-select-option>
  142. </a-select>
  143. </a-form-item>
  144. <a-form-item
  145. label="Session Key"
  146. v-if="inbound.stream.xhttp.sessionPlacement && inbound.stream.xhttp.sessionPlacement !== 'path'"
  147. >
  148. <a-input
  149. v-model.trim="inbound.stream.xhttp.sessionKey"
  150. placeholder="x_session"
  151. ></a-input>
  152. </a-form-item>
  153. <a-form-item label="Sequence Placement">
  154. <a-select
  155. v-model="inbound.stream.xhttp.seqPlacement"
  156. :dropdown-class-name="themeSwitcher.currentTheme"
  157. >
  158. <a-select-option value>Default (path)</a-select-option>
  159. <a-select-option value="path">path</a-select-option>
  160. <a-select-option value="header">header</a-select-option>
  161. <a-select-option value="cookie">cookie</a-select-option>
  162. <a-select-option value="query">query</a-select-option>
  163. </a-select>
  164. </a-form-item>
  165. <a-form-item
  166. label="Sequence Key"
  167. v-if="inbound.stream.xhttp.seqPlacement && inbound.stream.xhttp.seqPlacement !== 'path'"
  168. >
  169. <a-input
  170. v-model.trim="inbound.stream.xhttp.seqKey"
  171. placeholder="x_seq"
  172. ></a-input>
  173. </a-form-item>
  174. <a-form-item
  175. label="Uplink Data Placement"
  176. v-if="inbound.stream.xhttp.mode === 'packet-up'"
  177. >
  178. <a-select
  179. v-model="inbound.stream.xhttp.uplinkDataPlacement"
  180. :dropdown-class-name="themeSwitcher.currentTheme"
  181. >
  182. <a-select-option value>Default (body)</a-select-option>
  183. <a-select-option value="body">body</a-select-option>
  184. <a-select-option value="header">header</a-select-option>
  185. <a-select-option value="cookie">cookie</a-select-option>
  186. <a-select-option value="query">query</a-select-option>
  187. </a-select>
  188. </a-form-item>
  189. <a-form-item
  190. label="Uplink Data Key"
  191. v-if="inbound.stream.xhttp.mode === 'packet-up' && inbound.stream.xhttp.uplinkDataPlacement && inbound.stream.xhttp.uplinkDataPlacement !== 'body'"
  192. >
  193. <a-input
  194. v-model.trim="inbound.stream.xhttp.uplinkDataKey"
  195. placeholder="x_data"
  196. ></a-input>
  197. </a-form-item>
  198. <a-form-item
  199. label="Uplink Chunk Size"
  200. v-if="inbound.stream.xhttp.mode === 'packet-up' && inbound.stream.xhttp.uplinkDataPlacement && inbound.stream.xhttp.uplinkDataPlacement !== 'body'"
  201. >
  202. <a-input-number
  203. v-model.number="inbound.stream.xhttp.uplinkChunkSize"
  204. :min="0"
  205. placeholder="0 (unlimited)"
  206. ></a-input-number>
  207. </a-form-item>
  208. <a-form-item label="No SSE Header">
  209. <a-switch v-model="inbound.stream.xhttp.noSSEHeader"></a-switch>
  210. </a-form-item>
  211. </a-form>
  212. {{end}}