2023-02-09 22:18:06 +03:00
|
|
|
{{define "form/streamTCP"}}
|
|
|
|
<!-- tcp type -->
|
|
|
|
<a-form layout="inline">
|
2023-02-12 16:50:09 +03:00
|
|
|
<a-form-item label="AcceptProxyProtocol">
|
2023-02-09 22:18:06 +03:00
|
|
|
<a-switch v-model="inbound.stream.tcp.acceptProxyProtocol"></a-switch>
|
|
|
|
</a-form-item>
|
2023-05-04 20:52:54 +03:00
|
|
|
<a-form-item label='HTTP {{ i18n "camouflage" }}'>
|
2023-02-09 22:18:06 +03:00
|
|
|
<a-switch
|
2023-02-12 17:24:02 +03:00
|
|
|
:checked="inbound.stream.tcp.type === 'http'"
|
|
|
|
@change="checked => inbound.stream.tcp.type = checked ? 'http' : 'none'">
|
2023-02-09 22:18:06 +03:00
|
|
|
</a-switch>
|
|
|
|
</a-form-item>
|
|
|
|
</a-form>
|
|
|
|
|
|
|
|
<!-- tcp request -->
|
2023-05-08 17:44:22 +03:00
|
|
|
<a-form v-if="inbound.stream.tcp.type === 'http'" layout="inline">
|
2023-02-09 22:18:06 +03:00
|
|
|
<a-form-item label='{{ i18n "pages.inbounds.stream.tcp.requestVersion" }}'>
|
|
|
|
<a-input v-model.trim="inbound.stream.tcp.request.version"></a-input>
|
|
|
|
</a-form-item>
|
|
|
|
<a-form-item label='{{ i18n "pages.inbounds.stream.tcp.requestMethod" }}'>
|
|
|
|
<a-input v-model.trim="inbound.stream.tcp.request.method"></a-input>
|
|
|
|
</a-form-item>
|
|
|
|
<a-form-item label='{{ i18n "pages.inbounds.stream.tcp.requestPath" }}'>
|
|
|
|
<a-row v-for="(path, index) in inbound.stream.tcp.request.path">
|
|
|
|
<a-input v-model.trim="inbound.stream.tcp.request.path[index]"></a-input>
|
|
|
|
</a-row>
|
|
|
|
</a-form-item>
|
2023-05-22 22:06:15 +03:00
|
|
|
<br>
|
|
|
|
<a-form-item>
|
2023-02-09 22:18:06 +03:00
|
|
|
<a-row>
|
2023-05-22 22:06:15 +03:00
|
|
|
<span>{{ i18n "pages.inbounds.stream.general.requestHeader" }}:</span>
|
|
|
|
<a-button type="primary" size="small" style="margin-left: 10px" @click="inbound.stream.tcp.request.addHeader('Host', 'xxx.com')">+</a-button>
|
2023-02-09 22:18:06 +03:00
|
|
|
</a-row>
|
|
|
|
<a-input-group v-for="(header, index) in inbound.stream.tcp.request.headers">
|
|
|
|
<a-input style="width: 50%" v-model.trim="header.name"
|
|
|
|
addon-before='{{ i18n "pages.inbounds.stream.general.name" }}'></a-input>
|
|
|
|
<a-input style="width: 50%" v-model.trim="header.value"
|
|
|
|
addon-before='{{ i18n "pages.inbounds.stream.general.value" }}'>
|
|
|
|
<template slot="addonAfter">
|
2023-05-22 22:06:15 +03:00
|
|
|
<a-button type="primary" size="small" style="margin-left: 10px" @click="inbound.stream.tcp.request.removeHeader(index)">-</a-button>
|
2023-02-09 22:18:06 +03:00
|
|
|
</template>
|
|
|
|
</a-input>
|
|
|
|
</a-input-group>
|
|
|
|
</a-form-item>
|
2023-05-22 22:06:15 +03:00
|
|
|
|
2023-02-09 22:18:06 +03:00
|
|
|
</a-form>
|
|
|
|
|
|
|
|
<!-- tcp response -->
|
2023-05-08 17:44:22 +03:00
|
|
|
<a-form v-if="inbound.stream.tcp.type === 'http'" layout="inline">
|
2023-02-09 22:18:06 +03:00
|
|
|
<a-form-item label='{{ i18n "pages.inbounds.stream.tcp.responseVersion" }}'>
|
|
|
|
<a-input v-model.trim="inbound.stream.tcp.response.version"></a-input>
|
|
|
|
</a-form-item>
|
|
|
|
<a-form-item label='{{ i18n "pages.inbounds.stream.tcp.responseStatus" }}'>
|
|
|
|
<a-input v-model.trim="inbound.stream.tcp.response.status"></a-input>
|
|
|
|
</a-form-item>
|
|
|
|
<a-form-item label='{{ i18n "pages.inbounds.stream.tcp.responseStatusDescription" }}'>
|
|
|
|
<a-input v-model.trim="inbound.stream.tcp.response.reason"></a-input>
|
|
|
|
</a-form-item>
|
2023-05-22 22:06:15 +03:00
|
|
|
<a-form-item>
|
2023-02-09 22:18:06 +03:00
|
|
|
<a-row>
|
2023-05-22 22:06:15 +03:00
|
|
|
<span>{{ i18n "pages.inbounds.stream.tcp.responseHeader" }}:</span>
|
|
|
|
<a-button type="primary" size="small" style="margin-left: 10px" @click="inbound.stream.tcp.response.addHeader('Content-Type', 'application/octet-stream')">+</a-button>
|
2023-02-09 22:18:06 +03:00
|
|
|
</a-row>
|
|
|
|
<a-input-group v-for="(header, index) in inbound.stream.tcp.response.headers">
|
|
|
|
<a-input style="width: 50%" v-model.trim="header.name"
|
|
|
|
addon-before='{{ i18n "pages.inbounds.stream.general.name" }}'></a-input>
|
|
|
|
<a-input style="width: 50%" v-model.trim="header.value"
|
|
|
|
addon-before='{{ i18n "pages.inbounds.stream.general.value" }}'>
|
|
|
|
<template slot="addonAfter">
|
2023-05-22 22:06:15 +03:00
|
|
|
<a-button type="primary" size="small" style="margin-left: 10px" @click="inbound.stream.tcp.response.removeHeader(index)">-</a-button>
|
2023-02-09 22:18:06 +03:00
|
|
|
</template>
|
|
|
|
</a-input>
|
|
|
|
</a-input-group>
|
|
|
|
</a-form-item>
|
|
|
|
</a-form>
|
|
|
|
{{end}}
|