Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHo3ein <ho3ein.sanaei@gmail.com>2023-12-10 17:42:52 +0300
committerGitHub <noreply@github.com>2023-12-10 17:42:52 +0300
commite3f1d3c892a1af48f27fdc36f273a55f38d13b40 (patch)
treeb11d0c1ed3c15c8f6f891a5e6df8e021d5db8ab6 /web/html/xui/form/stream
parent36cf7c0a8fda915b51e75958ce729fd9a61a5c90 (diff)
parent9fbe80f87f950673058f0001b3704251fa8b9243 (diff)
huge changes
Diffstat (limited to 'web/html/xui/form/stream')
-rw-r--r--web/html/xui/form/stream/external_proxy.html32
-rw-r--r--web/html/xui/form/stream/stream_grpc.html24
-rw-r--r--web/html/xui/form/stream/stream_http.html28
-rw-r--r--web/html/xui/form/stream/stream_kcp.html125
-rw-r--r--web/html/xui/form/stream/stream_quic.html60
-rw-r--r--web/html/xui/form/stream/stream_settings.html3
-rw-r--r--web/html/xui/form/stream/stream_sockopt.html2
-rw-r--r--web/html/xui/form/stream/stream_tcp.html155
-rw-r--r--web/html/xui/form/stream/stream_ws.html10
9 files changed, 296 insertions, 143 deletions
diff --git a/web/html/xui/form/stream/external_proxy.html b/web/html/xui/form/stream/external_proxy.html
new file mode 100644
index 00000000..bb80070c
--- /dev/null
+++ b/web/html/xui/form/stream/external_proxy.html
@@ -0,0 +1,32 @@
+{{define "form/externalProxy"}}
+<a-form layout="inline">
+ <a-divider style="margin:0;"></a-divider>
+ <a-form-item label="External Proxy">
+ <a-switch v-model="externalProxy"></a-switch>
+ <a-button v-if="externalProxy" type="primary" style="margin-left: 10px" size="small" @click="inbound.stream.externalProxy.push({forceTls: 'same', dest: '', port: 443, remark: ''})">+</a-button>
+ </a-form-item>
+ <table width="100%" class="ant-table-tbody" v-if="externalProxy" style="margin-bottom:5px">
+ <tr style="line-height: 40px;">
+ <td width="100%">
+ <a-input-group style="margin: 0 5px;" compact v-for="(row, index) in inbound.stream.externalProxy">
+ <template>
+ <a-tooltip title="Force TLS">
+ <a-select v-model="row.forceTls" style="width:20%; margin: 0px" :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option value="same">{{ i18n "pages.inbounds.same" }}</a-select-option>
+ <a-select-option value="none">{{ i18n "none" }}</a-select-option>
+ <a-select-option value="tls">TLS</a-select-option>
+ </a-select>
+ </a-tooltip>
+ </template>
+ <a-input style="width: 35%" v-model.trim="row.dest" placeholder='{{ i18n "host" }}'></a-input>
+ <a-tooltip title='{{ i18n "pages.inbounds.port" }}'>
+ <a-input-number style="width: 15%;" v-model.number="row.port" min="1" max="65531"></a-input-number>
+ </a-tooltip>
+ <a-input style="width: 20%" v-model.trim="row.remark" placeholder='{{ i18n "remark" }}'></a-input>
+ <a-button style="width: 10%; margin: 0px" @click="inbound.stream.externalProxy.splice(index, 1)">-</a-button>
+ </a-input-group>
+ </td>
+ </tr>
+ </table>
+</a-form>
+{{end}}
diff --git a/web/html/xui/form/stream/stream_grpc.html b/web/html/xui/form/stream/stream_grpc.html
index 21c95f99..0e24ce83 100644
--- a/web/html/xui/form/stream/stream_grpc.html
+++ b/web/html/xui/form/stream/stream_grpc.html
@@ -1,10 +1,22 @@
{{define "form/streamGRPC"}}
<a-form layout="inline">
- <a-form-item label="ServiceName">
- <a-input v-model.trim="inbound.stream.grpc.serviceName"></a-input>
- </a-form-item>
- <a-form-item label="Multi Mode">
- <a-switch v-model="inbound.stream.grpc.multiMode"></a-switch>
- </a-form-item>
+ <table width="100%" class="ant-table-tbody">
+ <tr>
+ <td>serviceName</td>
+ <td>
+ <a-form-item>
+ <a-input v-model.trim="inbound.stream.grpc.serviceName" style="width: 250px;"></a-input>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>MultiMode</td>
+ <td>
+ <a-form-item>
+ <a-switch v-model="inbound.stream.grpc.multiMode"></a-switch>
+ </a-form-item>
+ </td>
+ </tr>
+ </table>
</a-form>
{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/stream/stream_http.html b/web/html/xui/form/stream/stream_http.html
index 57574ce5..124258a7 100644
--- a/web/html/xui/form/stream/stream_http.html
+++ b/web/html/xui/form/stream/stream_http.html
@@ -1,12 +1,24 @@
{{define "form/streamHTTP"}}
<a-form layout="inline">
- <a-form-item label='{{ i18n "path" }}'>
- <a-input v-model.trim="inbound.stream.http.path"></a-input>
- </a-form-item>
- <a-form-item label="Host">
- <a-row v-for="(host, index) in inbound.stream.http.host">
- <a-input v-model.trim="inbound.stream.http.host[index]"></a-input>
- </a-row>
- </a-form-item>
+ <table width="100%" class="ant-table-tbody">
+ <tr>
+ <td>{{ i18n "path" }}</td>
+ <td>
+ <a-form-item>
+ <a-input v-model.trim="inbound.stream.http.path" style="width: 250px;"></a-input>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>host</td>
+ <td>
+ <a-form-item>
+ <a-row v-for="(host, index) in inbound.stream.http.host">
+ <a-input v-model.trim="inbound.stream.http.host[index]" style="width: 250px;"></a-input>
+ </a-row>
+ </a-form-item>
+ </td>
+ </tr>
+ </table>
</a-form>
{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/stream/stream_kcp.html b/web/html/xui/form/stream/stream_kcp.html
index 0d6df9e3..11a29219 100644
--- a/web/html/xui/form/stream/stream_kcp.html
+++ b/web/html/xui/form/stream/stream_kcp.html
@@ -1,47 +1,86 @@
{{define "form/streamKCP"}}
<a-form layout="inline">
- <a-form-item label='{{ i18n "camouflage" }}'>
- <a-select v-model="inbound.stream.kcp.type" style="width: 280px;" :dropdown-class-name="themeSwitcher.darkCardClass">
- <a-select-option value="none">None (Not Camouflage)</a-select-option>
- <a-select-option value="srtp">SRTP (Camouflage Video Call)</a-select-option>
- <a-select-option value="utp">UTP (Camouflage BT Download)</a-select-option>
- <a-select-option value="wechat-video">Wechat-Video (Camouflage WeChat Video)</a-select-option>
- <a-select-option value="dtls">DTLS (Camouflage DTLS 1.2 Packages)</a-select-option>
- <a-select-option value="wireguard">Wireguard (Camouflage Wireguard Packages)</a-select-option>
- </a-select>
- </a-form-item>
- <br>
- <a-form-item label='{{ i18n "password" }}'>
- <a-icon @click="inbound.stream.kcp.seed = RandomUtil.randomSeq(10)" type="sync"> </a-icon>
- <a-input v-model="inbound.stream.kcp.seed" style="width: 150px;" ></a-input>
- </a-form-item>
- <br>
- <a-form-item label="MTU">
- <a-input-number v-model="inbound.stream.kcp.mtu"></a-input-number>
- </a-form-item>
- <br>
- <a-form-item label="TTI (ms)">
- <a-input-number v-model="inbound.stream.kcp.tti"></a-input-number>
- </a-form-item>
- <br>
- <a-form-item label="Uplink Capacity (MB/S)">
- <a-input-number v-model="inbound.stream.kcp.upCap"></a-input-number>
- </a-form-item>
- <br>
- <a-form-item label="Downlink Capacity (MB/S)">
- <a-input-number v-model="inbound.stream.kcp.downCap"></a-input-number>
- </a-form-item>
- <br>
- <a-form-item label="Congestion">
- <a-switch v-model="inbound.stream.kcp.congestion"></a-switch>
- </a-form-item>
- <br>
- <a-form-item label="Read Buffer Size (MB)">
- <a-input-number v-model="inbound.stream.kcp.readBuffer"></a-input-number>
- </a-form-item>
- <br>
- <a-form-item label="Write Buffer Size (MB)">
- <a-input-number v-model="inbound.stream.kcp.writeBuffer"></a-input-number>
- </a-form-item>
+ <table width="100%" class="ant-table-tbody">
+ <tr>
+ <td>{{ i18n "camouflage" }}</td>
+ <td>
+ <a-form-item>
+ <a-select v-model="inbound.stream.kcp.type" style="width: 250px;"
+ :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option value="none">None (Not Camouflage)</a-select-option>
+ <a-select-option value="srtp">SRTP (Camouflage Video Call)</a-select-option>
+ <a-select-option value="utp">UTP (Camouflage BT Download)</a-select-option>
+ <a-select-option value="wechat-video">Wechat-Video (Camouflage WeChat Video)</a-select-option>
+ <a-select-option value="dtls">DTLS (Camouflage DTLS 1.2 Packages)</a-select-option>
+ <a-select-option value="wireguard">Wireguard (Camouflage Wireguard Packages)</a-select-option>
+ </a-select>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>{{ i18n "password" }}</td>
+ <td>
+ <a-form-item>
+ <a-input v-model="inbound.stream.kcp.seed" style="width: 250px;"></a-input>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>MTU</td>
+ <td>
+ <a-form-item>
+ <a-input-number v-model.number="inbound.stream.kcp.mtu"></a-input-number>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>TTI (ms)</td>
+ <td>
+ <a-form-item>
+ <a-input-number v-model.number="inbound.stream.kcp.tti"></a-input-number>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>Uplink Capacity (MB/S)</td>
+ <td>
+ <a-form-item>
+ <a-input-number v-model.number="inbound.stream.kcp.upCap"></a-input-number>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>Downlink Capacity (MB/S)</td>
+ <td>
+ <a-form-item>
+ <a-input-number v-model.number="inbound.stream.kcp.downCap"></a-input-number>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>Congestion</td>
+ <td>
+ <a-form-item>
+ <a-switch v-model="inbound.stream.kcp.congestion"></a-switch>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>Read Buffer Size (MB)</td>
+ <td>
+ <a-form-item>
+ <a-input-number v-model.number="inbound.stream.kcp.readBuffer"></a-input-number>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>Write Buffer Size (MB)</td>
+ <td>
+ <a-form-item>
+ <a-input-number v-model.number="inbound.stream.kcp.writeBuffer"></a-input-number>
+ </a-form-item>
+ </td>
+ </tr>
+ </table>
</a-form>
{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/stream/stream_quic.html b/web/html/xui/form/stream/stream_quic.html
index 53e60b2d..1341d4f1 100644
--- a/web/html/xui/form/stream/stream_quic.html
+++ b/web/html/xui/form/stream/stream_quic.html
@@ -1,25 +1,43 @@
{{define "form/streamQUIC"}}
<a-form layout="inline">
- <a-form-item label='{{ i18n "pages.inbounds.stream.quic.encryption" }}'>
- <a-select v-model="inbound.stream.quic.security" style="width: 165px;" :dropdown-class-name="themeSwitcher.darkCardClass">
- <a-select-option value="none">none</a-select-option>
- <a-select-option value="aes-128-gcm">aes-128-gcm</a-select-option>
- <a-select-option value="chacha20-poly1305">chacha20-poly1305</a-select-option>
- </a-select>
- </a-form-item>
- <a-form-item label='{{ i18n "password" }}'>
- <a-icon @click="inbound.stream.quic.key = RandomUtil.randomSeq(10)" type="sync"> </a-icon>
- <a-input v-model.trim="inbound.stream.quic.key" style="width: 150px;"></a-input>
- </a-form-item>
- <a-form-item label='{{ i18n "camouflage" }}'>
- <a-select v-model="inbound.stream.quic.type" style="width: 280px;" :dropdown-class-name="themeSwitcher.darkCardClass">
- <a-select-option value="none">none (not camouflage)</a-select-option>
- <a-select-option value="srtp">srtp (camouflage video call)</a-select-option>
- <a-select-option value="utp">utp (camouflage BT download)</a-select-option>
- <a-select-option value="wechat-video">wechat-video (camouflage WeChat video)</a-select-option>
- <a-select-option value="dtls">dtls (camouflage DTLS 1.2 packages)</a-select-option>
- <a-select-option value="wireguard">wireguard (camouflage wireguard packages)</a-select-option>
- </a-select>
- </a-form-item>
+ <table width="100%" class="ant-table-tbody">
+ <tr>
+ <td>{{ i18n "pages.inbounds.stream.quic.encryption" }}</td>
+ <td>
+ <a-form-item>
+ <a-select v-model="inbound.stream.quic.security" style="width: 250px;"
+ :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option value="none">none</a-select-option>
+ <a-select-option value="aes-128-gcm">aes-128-gcm</a-select-option>
+ <a-select-option value="chacha20-poly1305">chacha20-poly1305</a-select-option>
+ </a-select>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>{{ i18n "password" }}</td>
+ <td>
+ <a-form-item>
+ <a-input v-model.trim="inbound.stream.quic.key" style="width: 250px;"></a-input>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>{{ i18n "camouflage" }}</td>
+ <td>
+ <a-form-item>
+ <a-select v-model="inbound.stream.quic.type" style="width: 280px;"
+ :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option value="none">none (not camouflage)</a-select-option>
+ <a-select-option value="srtp">srtp (camouflage video call)</a-select-option>
+ <a-select-option value="utp">utp (camouflage BT download)</a-select-option>
+ <a-select-option value="wechat-video">wechat-video (camouflage WeChat video)</a-select-option>
+ <a-select-option value="dtls">dtls (camouflage DTLS 1.2 packages)</a-select-option>
+ <a-select-option value="wireguard">wireguard (camouflage wireguard packages)</a-select-option>
+ </a-select>
+ </a-form-item>
+ </td>
+ </tr>
+ </table>
</a-form>
{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/stream/stream_settings.html b/web/html/xui/form/stream/stream_settings.html
index e50caf19..7a0069c5 100644
--- a/web/html/xui/form/stream/stream_settings.html
+++ b/web/html/xui/form/stream/stream_settings.html
@@ -2,7 +2,8 @@
<!-- select stream network -->
<a-form layout="inline">
<a-form-item label='{{ i18n "transmission" }}'>
- <a-select v-model="inbound.stream.network" @change="streamNetworkChange" :dropdown-class-name="themeSwitcher.darkCardClass">
+ <a-select v-model="inbound.stream.network" @change="streamNetworkChange"
+ :dropdown-class-name="themeSwitcher.currentTheme" style="width: 100px;">
<a-select-option value="tcp">TCP</a-select-option>
<a-select-option value="kcp">KCP</a-select-option>
<a-select-option value="ws">WS</a-select-option>
diff --git a/web/html/xui/form/stream/stream_sockopt.html b/web/html/xui/form/stream/stream_sockopt.html
index d90bf206..5da2f8af 100644
--- a/web/html/xui/form/stream/stream_sockopt.html
+++ b/web/html/xui/form/stream/stream_sockopt.html
@@ -33,7 +33,7 @@
<td>
<a-form-item>
<a-select v-model="inbound.stream.sockopt.tproxy" style="width: 250px;"
- :dropdown-class-name="themeSwitcher.darkCardClass">
+ :dropdown-class-name="themeSwitcher.currentTheme">
<a-select-option value="off">OFF</a-select-option>
<a-select-option value="redirect">Redirect</a-select-option>
<a-select-option value="tproxy">T-Proxy</a-select-option>
diff --git a/web/html/xui/form/stream/stream_tcp.html b/web/html/xui/form/stream/stream_tcp.html
index 3b601047..bdf9c7da 100644
--- a/web/html/xui/form/stream/stream_tcp.html
+++ b/web/html/xui/form/stream/stream_tcp.html
@@ -1,7 +1,7 @@
{{define "form/streamTCP"}}
<!-- tcp type -->
<a-form layout="inline">
- <a-form-item label="AcceptProxyProtocol">
+ <a-form-item label="Accept Proxy Protocol" v-if="inbound.canEnableTls()">
<a-switch v-model="inbound.stream.tcp.acceptProxyProtocol"></a-switch>
</a-form-item>
<a-form-item label='HTTP {{ i18n "camouflage" }}'>
@@ -14,63 +14,100 @@
<!-- tcp request -->
<a-form v-if="inbound.stream.tcp.type === 'http'" layout="inline">
- <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>
- <br>
- <a-form-item>
- <a-row>
- <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>
- </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">
- <a-button type="primary" size="small" style="margin-left: 10px" @click="inbound.stream.tcp.request.removeHeader(index)">-</a-button>
- </template>
- </a-input>
- </a-input-group>
- </a-form-item>
-
-</a-form>
-
-<!-- tcp response -->
-<a-form v-if="inbound.stream.tcp.type === 'http'" layout="inline">
- <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>
- <a-form-item>
- <a-row>
- <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>
- </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">
- <a-button type="primary" size="small" style="margin-left: 10px" @click="inbound.stream.tcp.response.removeHeader(index)">-</a-button>
- </template>
- </a-input>
- </a-input-group>
- </a-form-item>
+ <table width="100%" class="ant-table-tbody">
+ <tr>
+ <td>{{ i18n "pages.inbounds.stream.tcp.requestVersion" }}</td>
+ <td>
+ <a-form-item>
+ <a-input v-model.trim="inbound.stream.tcp.request.version" style="width: 200px;"></a-input>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>{{ i18n "pages.inbounds.stream.tcp.requestMethod" }}</td>
+ <td>
+ <a-form-item>
+ <a-input v-model.trim="inbound.stream.tcp.request.method" style="width: 200px;"></a-input>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td style="vertical-align: top; padding-top: 10px;">{{ i18n "pages.inbounds.stream.tcp.requestPath" }}
+ <a-button size="small" @click="inbound.stream.tcp.request.addPath('/')">+</a-button>
+ </td>
+ <td>
+ <a-form-item>
+ <a-row v-for="(path, index) in inbound.stream.tcp.request.path">
+ <a-input v-model.trim="inbound.stream.tcp.request.path[index]" style="width: 200px;">
+ <a-button size="small" slot="addonAfter"
+ @click="inbound.stream.tcp.request.removePath(index)"
+ v-if="inbound.stream.tcp.request.path.length>1">-</a-button>
+ </a-input>
+ </a-row>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" width="100%">
+ <a-form-item>
+ <span>{{ i18n "pages.inbounds.stream.general.requestHeader" }}:</span>
+ <a-button size="small" style="margin-left: 10px" @click="inbound.stream.tcp.request.addHeader('', '')">+</a-button>
+ <a-input-group compact v-for="(header, index) in inbound.stream.tcp.request.headers">
+ <a-input style="width: 50%" v-model.trim="header.name" placeholder='{{ i18n "pages.inbounds.stream.general.name" }}'>
+ <template slot="addonBefore" style="margin: 0;">[[ index+1 ]]</template>
+ </a-input>
+ <a-input style="width: 50%" v-model.trim="header.value" placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'>
+ <a-button slot="addonAfter" size="small" @click="inbound.stream.tcp.request.removeHeader(index)">-</a-button>
+ </a-input>
+ </a-input-group>
+ </a-form-item>
+ </td>
+ </tr>
+ <!-- tcp response -->
+ <tr>
+ <td>{{ i18n "pages.inbounds.stream.tcp.responseVersion" }}</td>
+ <td>
+ <a-form-item>
+ <a-input v-model.trim="inbound.stream.tcp.response.version" style="width: 200px;"></a-input>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>{{ i18n "pages.inbounds.stream.tcp.responseStatus" }}</td>
+ <td>
+ <a-form-item>
+ <a-input v-model.trim="inbound.stream.tcp.response.status" style="width: 200px;"></a-input>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td>{{ i18n "pages.inbounds.stream.tcp.responseStatusDescription" }}</td>
+ <td>
+ <a-form-item>
+ <a-input v-model.trim="inbound.stream.tcp.response.reason" style="width: 200px;"></a-input>
+ </a-form-item>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" width="100%">
+ <a-form-item>
+ <span>{{ i18n "pages.inbounds.stream.tcp.responseHeader" }}:</span>
+ <a-button size="small" style="margin-left: 10px"
+ @click="inbound.stream.tcp.response.addHeader('Content-Type', 'application/octet-stream')">+</a-button>
+ <a-input-group compact v-for="(header, index) in inbound.stream.tcp.response.headers">
+ <a-input style="width: 50%" v-model.trim="header.name" placeholder='{{ i18n "pages.inbounds.stream.general.name" }}'>
+ <template slot="addonBefore" style="margin: 0;">[[ index+1 ]]</template>
+ </a-input>
+ <a-input style="width: 50%" v-model.trim="header.value"
+ placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'>
+ <template slot="addonAfter">
+ <a-button size="small" @click="inbound.stream.tcp.response.removeHeader(index)">-</a-button>
+ </template>
+ </a-input>
+ </a-input-group>
+ </a-form-item>
+ </td>
+ </tr>
+ </table>
</a-form>
{{end}} \ No newline at end of file
diff --git a/web/html/xui/form/stream/stream_ws.html b/web/html/xui/form/stream/stream_ws.html
index 25d1299c..92e4e138 100644
--- a/web/html/xui/form/stream/stream_ws.html
+++ b/web/html/xui/form/stream/stream_ws.html
@@ -11,15 +11,17 @@
<a-form-item>
<a-row>
<span>{{ i18n "pages.inbounds.stream.general.requestHeader" }}:</span>
- <a-button type="primary" size="small" style="margin-left: 10px" @click="inbound.stream.ws.addHeader('Host', '')">+</a-button>
+ <a-button type="primary" size="small" style="margin-left: 10px"
+ @click="inbound.stream.ws.addHeader('Host', '')">+</a-button>
</a-row>
<a-input-group v-for="(header, index) in inbound.stream.ws.headers">
<a-input style="width: 50%" v-model.trim="header.name"
- addon-before='{{ i18n "pages.inbounds.stream.general.name"}}'></a-input>
+ 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" }}'>
+ addon-before='{{ i18n "pages.inbounds.stream.general.value" }}'>
<template slot="addonAfter">
- <a-button type="primary" size="small" style="margin-left: 10px" @click="inbound.stream.ws.removeHeader(index)">-</a-button>
+ <a-button type="primary" size="small" style="margin-left: 10px"
+ @click="inbound.stream.ws.removeHeader(index)">-</a-button>
</template>
</a-input>
</a-input-group>