stream_xhttp.html 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  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>
  74. </a-form-item>
  75. <a-form-item label="Padding Method">
  76. <a-select v-model="inbound.stream.xhttp.xPaddingMethod"
  77. :dropdown-class-name="themeSwitcher.currentTheme">
  78. <a-select-option value>Default (repeat-x)</a-select-option>
  79. <a-select-option value="repeat-x">repeat-x</a-select-option>
  80. <a-select-option value="tokenish">tokenish</a-select-option>
  81. </a-select>
  82. </a-form-item>
  83. </template>
  84. <a-form-item label="Uplink HTTP Method">
  85. <a-select v-model="inbound.stream.xhttp.uplinkHTTPMethod"
  86. :dropdown-class-name="themeSwitcher.currentTheme">
  87. <a-select-option value>Default (POST)</a-select-option>
  88. <a-select-option value="POST">POST</a-select-option>
  89. <a-select-option value="PUT">PUT</a-select-option>
  90. <a-select-option value="GET">GET (packet-up only)</a-select-option>
  91. </a-select>
  92. </a-form-item>
  93. <a-form-item label="Session Placement">
  94. <a-select v-model="inbound.stream.xhttp.sessionPlacement"
  95. :dropdown-class-name="themeSwitcher.currentTheme">
  96. <a-select-option value>Default (path)</a-select-option>
  97. <a-select-option value="path">path</a-select-option>
  98. <a-select-option value="header">header</a-select-option>
  99. <a-select-option value="cookie">cookie</a-select-option>
  100. <a-select-option value="query">query</a-select-option>
  101. </a-select>
  102. </a-form-item>
  103. <a-form-item label="Session Key"
  104. v-if="inbound.stream.xhttp.sessionPlacement && inbound.stream.xhttp.sessionPlacement !== 'path'">
  105. <a-input v-model.trim="inbound.stream.xhttp.sessionKey"
  106. placeholder="x_session"></a-input>
  107. </a-form-item>
  108. <a-form-item label="Sequence Placement">
  109. <a-select v-model="inbound.stream.xhttp.seqPlacement"
  110. :dropdown-class-name="themeSwitcher.currentTheme">
  111. <a-select-option value>Default (path)</a-select-option>
  112. <a-select-option value="path">path</a-select-option>
  113. <a-select-option value="header">header</a-select-option>
  114. <a-select-option value="cookie">cookie</a-select-option>
  115. <a-select-option value="query">query</a-select-option>
  116. </a-select>
  117. </a-form-item>
  118. <a-form-item label="Sequence Key"
  119. v-if="inbound.stream.xhttp.seqPlacement && inbound.stream.xhttp.seqPlacement !== 'path'">
  120. <a-input v-model.trim="inbound.stream.xhttp.seqKey"
  121. placeholder="x_seq"></a-input>
  122. </a-form-item>
  123. <a-form-item label="Uplink Data Placement"
  124. v-if="inbound.stream.xhttp.mode === 'packet-up'">
  125. <a-select v-model="inbound.stream.xhttp.uplinkDataPlacement"
  126. :dropdown-class-name="themeSwitcher.currentTheme">
  127. <a-select-option value>Default (body)</a-select-option>
  128. <a-select-option value="body">body</a-select-option>
  129. <a-select-option value="header">header</a-select-option>
  130. <a-select-option value="query">query</a-select-option>
  131. </a-select>
  132. </a-form-item>
  133. <a-form-item label="Uplink Data Key"
  134. v-if="inbound.stream.xhttp.mode === 'packet-up' && inbound.stream.xhttp.uplinkDataPlacement && inbound.stream.xhttp.uplinkDataPlacement !== 'body'">
  135. <a-input v-model.trim="inbound.stream.xhttp.uplinkDataKey"
  136. placeholder="x_data"></a-input>
  137. </a-form-item>
  138. <a-form-item label="Uplink Chunk Size"
  139. v-if="inbound.stream.xhttp.mode === 'packet-up' && inbound.stream.xhttp.uplinkDataPlacement && inbound.stream.xhttp.uplinkDataPlacement !== 'body'">
  140. <a-input-number v-model.number="inbound.stream.xhttp.uplinkChunkSize"
  141. :min="0" placeholder="0 (unlimited)"></a-input-number>
  142. </a-form-item>
  143. <a-form-item label="No SSE Header">
  144. <a-switch v-model="inbound.stream.xhttp.noSSEHeader"></a-switch>
  145. </a-form-item>
  146. </a-form>
  147. {{end}}