1
0

stream_xhttp.html 7.4 KB

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