stream_xhttp.html 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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" @click="inbound.stream.xhttp.removeHeader(index)"></a-button>
  21. </a-input>
  22. </a-input-group>
  23. </a-form-item>
  24. <a-form-item label='Mode'>
  25. <a-select v-model="inbound.stream.xhttp.mode" style="width: 50%"
  26. :dropdown-class-name="themeSwitcher.currentTheme">
  27. <a-select-option v-for="key in MODE_OPTION" :value="key">[[ key ]]</a-select-option>
  28. </a-select>
  29. </a-form-item>
  30. <a-form-item label="Max Buffered Upload" v-if="inbound.stream.xhttp.mode === 'packet-up'">
  31. <a-input-number v-model.number="inbound.stream.xhttp.scMaxBufferedPosts"></a-input-number>
  32. </a-form-item>
  33. <a-form-item label="Max Upload Size (Byte)" v-if="inbound.stream.xhttp.mode === 'packet-up'">
  34. <a-input v-model.trim="inbound.stream.xhttp.scMaxEachPostBytes"></a-input>
  35. </a-form-item>
  36. <a-form-item label="Padding Bytes">
  37. <a-input v-model.trim="inbound.stream.xhttp.xPaddingBytes"></a-input>
  38. </a-form-item>
  39. <a-form-item label="No SSE Header">
  40. <a-switch v-model="inbound.stream.xhttp.noSSEHeader"></a-switch>
  41. </a-form-item>
  42. </a-form>
  43. {{end}}