1
0

stream_xhttp.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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="Server Max Header Bytes">
  41. <a-input-number v-model.number="inbound.stream.xhttp.serverMaxHeaderBytes" :min="0"
  42. placeholder="0 (default)"></a-input-number>
  43. </a-form-item>
  44. <a-form-item label="Padding Bytes">
  45. <a-input v-model.trim="inbound.stream.xhttp.xPaddingBytes"></a-input>
  46. </a-form-item>
  47. <a-form-item label="Padding Obfs Mode">
  48. <a-switch v-model="inbound.stream.xhttp.xPaddingObfsMode"></a-switch>
  49. </a-form-item>
  50. <template v-if="inbound.stream.xhttp.xPaddingObfsMode">
  51. <a-form-item label="Padding Key">
  52. <a-input v-model.trim="inbound.stream.xhttp.xPaddingKey" placeholder="x_padding"></a-input>
  53. </a-form-item>
  54. <a-form-item label="Padding Header">
  55. <a-input v-model.trim="inbound.stream.xhttp.xPaddingHeader" placeholder="X-Padding"></a-input>
  56. </a-form-item>
  57. <a-form-item label="Padding Placement">
  58. <a-select v-model="inbound.stream.xhttp.xPaddingPlacement" :dropdown-class-name="themeSwitcher.currentTheme">
  59. <a-select-option value>Default (queryInHeader)</a-select-option>
  60. <a-select-option value="queryInHeader">queryInHeader</a-select-option>
  61. <a-select-option value="header">header</a-select-option>
  62. <a-select-option value="cookie">cookie</a-select-option>
  63. <a-select-option value="query">query</a-select-option>
  64. </a-select>
  65. </a-form-item>
  66. <a-form-item label="Padding Method">
  67. <a-select v-model="inbound.stream.xhttp.xPaddingMethod" :dropdown-class-name="themeSwitcher.currentTheme">
  68. <a-select-option value>Default (repeat-x)</a-select-option>
  69. <a-select-option value="repeat-x">repeat-x</a-select-option>
  70. <a-select-option value="tokenish">tokenish</a-select-option>
  71. </a-select>
  72. </a-form-item>
  73. </template>
  74. <a-form-item label="Session Placement">
  75. <a-select v-model="inbound.stream.xhttp.sessionPlacement" :dropdown-class-name="themeSwitcher.currentTheme">
  76. <a-select-option value>Default (path)</a-select-option>
  77. <a-select-option value="path">path</a-select-option>
  78. <a-select-option value="header">header</a-select-option>
  79. <a-select-option value="cookie">cookie</a-select-option>
  80. <a-select-option value="query">query</a-select-option>
  81. </a-select>
  82. </a-form-item>
  83. <a-form-item label="Session Key"
  84. v-if="inbound.stream.xhttp.sessionPlacement && inbound.stream.xhttp.sessionPlacement !== 'path'">
  85. <a-input v-model.trim="inbound.stream.xhttp.sessionKey" placeholder="x_session"></a-input>
  86. </a-form-item>
  87. <a-form-item label="Sequence Placement">
  88. <a-select v-model="inbound.stream.xhttp.seqPlacement" :dropdown-class-name="themeSwitcher.currentTheme">
  89. <a-select-option value>Default (path)</a-select-option>
  90. <a-select-option value="path">path</a-select-option>
  91. <a-select-option value="header">header</a-select-option>
  92. <a-select-option value="cookie">cookie</a-select-option>
  93. <a-select-option value="query">query</a-select-option>
  94. </a-select>
  95. </a-form-item>
  96. <a-form-item label="Sequence Key"
  97. v-if="inbound.stream.xhttp.seqPlacement && inbound.stream.xhttp.seqPlacement !== 'path'">
  98. <a-input v-model.trim="inbound.stream.xhttp.seqKey" placeholder="x_seq"></a-input>
  99. </a-form-item>
  100. <a-form-item label="Uplink Data Placement" v-if="inbound.stream.xhttp.mode === 'packet-up'">
  101. <a-select v-model="inbound.stream.xhttp.uplinkDataPlacement" :dropdown-class-name="themeSwitcher.currentTheme">
  102. <a-select-option value>Default (body)</a-select-option>
  103. <a-select-option value="body">body</a-select-option>
  104. <a-select-option value="header">header</a-select-option>
  105. <a-select-option value="cookie">cookie</a-select-option>
  106. <a-select-option value="query">query</a-select-option>
  107. </a-select>
  108. </a-form-item>
  109. <a-form-item label="Uplink Data Key"
  110. v-if="inbound.stream.xhttp.mode === 'packet-up' && inbound.stream.xhttp.uplinkDataPlacement && inbound.stream.xhttp.uplinkDataPlacement !== 'body'">
  111. <a-input v-model.trim="inbound.stream.xhttp.uplinkDataKey" placeholder="x_data"></a-input>
  112. </a-form-item>
  113. <a-form-item label="No SSE Header">
  114. <a-switch v-model="inbound.stream.xhttp.noSSEHeader"></a-switch>
  115. </a-form-item>
  116. </a-form>
  117. {{end}}