stream_xhttp.html 7.6 KB

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