stream_xhttp.html 6.8 KB

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