diff options
Diffstat (limited to 'web/html/xui/form/stream')
| -rw-r--r-- | web/html/xui/form/stream/external_proxy.html | 46 | ||||
| -rw-r--r-- | web/html/xui/form/stream/stream_grpc.html | 26 | ||||
| -rw-r--r-- | web/html/xui/form/stream/stream_http.html | 37 | ||||
| -rw-r--r-- | web/html/xui/form/stream/stream_kcp.html | 118 | ||||
| -rw-r--r-- | web/html/xui/form/stream/stream_quic.html | 61 | ||||
| -rw-r--r-- | web/html/xui/form/stream/stream_settings.html | 7 | ||||
| -rw-r--r-- | web/html/xui/form/stream/stream_sockopt.html | 60 | ||||
| -rw-r--r-- | web/html/xui/form/stream/stream_tcp.html | 159 | ||||
| -rw-r--r-- | web/html/xui/form/stream/stream_ws.html | 29 |
9 files changed, 194 insertions, 349 deletions
diff --git a/web/html/xui/form/stream/external_proxy.html b/web/html/xui/form/stream/external_proxy.html index bb80070c..ab1437ca 100644 --- a/web/html/xui/form/stream/external_proxy.html +++ b/web/html/xui/form/stream/external_proxy.html @@ -1,32 +1,26 @@ {{define "form/externalProxy"}} -<a-form layout="inline"> +<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }"> <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-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-input-group style="margin: 5px 0;" 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> </a-form> {{end}} diff --git a/web/html/xui/form/stream/stream_grpc.html b/web/html/xui/form/stream/stream_grpc.html index 0e24ce83..e8c14e7c 100644 --- a/web/html/xui/form/stream/stream_grpc.html +++ b/web/html/xui/form/stream/stream_grpc.html @@ -1,22 +1,10 @@ {{define "form/streamGRPC"}} -<a-form layout="inline"> - <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 :colon="false" :label-col="{ md: {span:6} }" :wrapper-col="{ md: {span:14} }"> + <a-form-item label="Service Name"> + <a-input v-model.trim="inbound.stream.grpc.serviceName" style="width: 250px;"></a-input> + </a-form-item> + <a-form-item label="MultiMode"> + <a-switch v-model="inbound.stream.grpc.multiMode"></a-switch> + </a-form-item> </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 124258a7..3d854743 100644 --- a/web/html/xui/form/stream/stream_http.html +++ b/web/html/xui/form/stream/stream_http.html @@ -1,24 +1,19 @@ {{define "form/streamHTTP"}} -<a-form layout="inline"> - <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 :colon="false" :label-col="{ md: {span:6} }" :wrapper-col="{ md: {span:14} }"> + <a-form-item label='{{ i18n "path" }}'> + <a-input v-model.trim="inbound.stream.http.path"></a-input> + </a-form-item> + <a-form-item> + <template slot="label">{{ i18n "host" }} + <a-button size="small" @click="inbound.stream.http.addHost()">+</a-button> + </template> + <template v-for="(host, index) in inbound.stream.http.host"> + <a-input v-model.trim="inbound.stream.http.host[index]"> + <a-button size="small" slot="addonAfter" + @click="inbound.stream.http.removeHost(index)" + v-if="inbound.stream.http.host.length>1">-</a-button> + </a-input> + </template> + </a-form-item> </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 11a29219..c63fd987 100644 --- a/web/html/xui/form/stream/stream_kcp.html +++ b/web/html/xui/form/stream/stream_kcp.html @@ -1,86 +1,38 @@ {{define "form/streamKCP"}} -<a-form layout="inline"> - <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 :colon="false" :label-col="{ md: {span:6} }" :wrapper-col="{ md: {span:14} }"> + <a-form-item label='{{ i18n "camouflage" }}'> + <a-select v-model="inbound.stream.kcp.type" :dropdown-class-name="themeSwitcher.currentTheme"> + <a-select-option value="none">none (not camouflage)</a-select-option> + <a-select-option value="srtp">SRTP (video call)</a-select-option> + <a-select-option value="utp">UTP (BT DownloaD)</a-select-option> + <a-select-option value="wechat-video">wechat-video (WeChat video)</a-select-option> + <a-select-option value="dtls">DTLS (DTLS 1.2 packages)</a-select-option> + <a-select-option value="wireguard">WireGuard (WireGuard packages)</a-select-option> + </a-select> + </a-form-item> + <a-form-item label='{{ i18n "password" }}'> + <a-input v-model="inbound.stream.kcp.seed"></a-input> + </a-form-item> + <a-form-item label='MTU'> + <a-input-number v-model.number="inbound.stream.kcp.mtu"></a-input-number> + </a-form-item> + <a-form-item label='TTI(ms)'> + <a-input-number v-model.number="inbound.stream.kcp.tti"></a-input-number> + </a-form-item> + <a-form-item label='Uplink(Mb/s)'> + <a-input-number v-model.number="inbound.stream.kcp.upCap"></a-input-number> + </a-form-item> + <a-form-item label='Downlink(Mb/s)'> + <a-input-number v-model.number="inbound.stream.kcp.downCap"></a-input-number> + </a-form-item> + <a-form-item label='Congestion'> + <a-switch v-model="inbound.stream.kcp.congestion"></a-switch> + </a-form-item> + <a-form-item label='Read buffer(MB)'> + <a-input-number v-model.number="inbound.stream.kcp.readBuffer"></a-input-number> + </a-form-item> + <a-form-item label='Write buffer(MB)'> + <a-input-number v-model.number="inbound.stream.kcp.writeBuffer"></a-input-number> + </a-form-item> </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 1341d4f1..5cf6f7a3 100644 --- a/web/html/xui/form/stream/stream_quic.html +++ b/web/html/xui/form/stream/stream_quic.html @@ -1,43 +1,24 @@ {{define "form/streamQUIC"}} -<a-form layout="inline"> - <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 :colon="false" :label-col="{ md: {span:6} }" :wrapper-col="{ md: {span:14} }"> + <a-form-item label='{{ i18n "pages.inbounds.stream.quic.encryption" }}'> + <a-select v-model="inbound.stream.quic.security" :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> + <a-form-item label='{{ i18n "password" }}'> + <a-input v-model.trim="inbound.stream.quic.key"></a-input> + </a-form-item> + <a-form-item label='{{ i18n "camouflage" }}'> + <a-select v-model="inbound.stream.quic.type" :dropdown-class-name="themeSwitcher.currentTheme"> + <a-select-option value="none">none (not camouflage)</a-select-option> + <a-select-option value="srtp">SRTP (video call)</a-select-option> + <a-select-option value="utp">UTP (BT Download)</a-select-option> + <a-select-option value="wechat-video">wechat-video (WeChat video)</a-select-option> + <a-select-option value="dtls">DTLS (DTLS 1.2 packages)</a-select-option> + <a-select-option value="wireguard">WireGuard (WireGuard Packages)</a-select-option> + </a-select> + </a-form-item> </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 7a0069c5..85935af0 100644 --- a/web/html/xui/form/stream/stream_settings.html +++ b/web/html/xui/form/stream/stream_settings.html @@ -1,9 +1,9 @@ {{define "form/streamSettings"}} <!-- select stream network --> -<a-form layout="inline"> - <a-form-item label='{{ i18n "transmission" }}'> +<a-form :colon="false" :label-col="{ md: {span:6} }" :wrapper-col="{ md: {span:14} }"> + <a-form-item label="{{ i18n "transmission" }}"> <a-select v-model="inbound.stream.network" @change="streamNetworkChange" - :dropdown-class-name="themeSwitcher.currentTheme" style="width: 100px;"> + :dropdown-class-name="themeSwitcher.currentTheme"> <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> @@ -43,7 +43,6 @@ <template v-if="inbound.stream.network === 'grpc'"> {{template "form/streamGRPC"}} </template> - <!-- sockopt --> <template> {{template "form/streamSockopt"}} diff --git a/web/html/xui/form/stream/stream_sockopt.html b/web/html/xui/form/stream/stream_sockopt.html index 5da2f8af..aa0f1d3e 100644 --- a/web/html/xui/form/stream/stream_sockopt.html +++ b/web/html/xui/form/stream/stream_sockopt.html @@ -1,46 +1,26 @@ {{define "form/streamSockopt"}} -<a-form layout="inline"> +<a-divider style="margin:0;"></a-divider> +<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }"> <a-form-item label="Transparent Proxy"> <a-switch v-model="inbound.stream.sockoptSwitch"></a-switch> </a-form-item> - <table width="100%" class="ant-table-tbody" v-if="inbound.stream.sockoptSwitch"> - <tr> - <td>Accept Proxy Protocol</td> - <td> - <a-form-item> - <a-switch v-model="inbound.stream.sockopt.acceptProxyProtocol"></a-switch> - </a-form-item> - </td> - </tr> - <tr> - <td>TCP FastOpen</td> - <td> - <a-form-item> - <a-switch v-model.trim="inbound.stream.sockopt.tcpFastOpen"></a-switch> - </a-form-item> - </td> - </tr> - <tr> - <td>Route Mark</td> - <td> - <a-form-item> - <a-input-number v-model="inbound.stream.sockopt.mark" :min="0"></a-input-number> - </a-form-item> - </td> - </tr> - <tr> - <td>T-Proxy</td> - <td> - <a-form-item> - <a-select v-model="inbound.stream.sockopt.tproxy" style="width: 250px;" - :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> - </a-select> - </a-form-item> - </td> - </tr> - </table> + <template v-if="inbound.stream.sockoptSwitch"> + <a-form-item label="Accept Proxy Protocol"> + <a-switch v-model="inbound.stream.sockopt.acceptProxyProtocol"></a-switch> + </a-form-item> + <a-form-item label="TCP FastOpen"> + <a-switch v-model.trim="inbound.stream.sockopt.tcpFastOpen"></a-switch> + </a-form-item> + <a-form-item label="Route Mark"> + <a-input-number v-model="inbound.stream.sockopt.mark" :min="0"></a-input-number> + </a-form-item> + <a-form-item label="T-Proxy"> + <a-select v-model="inbound.stream.sockopt.tproxy" :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> + </a-select> + </a-form-item> + </template> </a-form> {{end}}
\ No newline at end of file diff --git a/web/html/xui/form/stream/stream_tcp.html b/web/html/xui/form/stream/stream_tcp.html index bdf9c7da..3fa0cec9 100644 --- a/web/html/xui/form/stream/stream_tcp.html +++ b/web/html/xui/form/stream/stream_tcp.html @@ -1,113 +1,76 @@ {{define "form/streamTCP"}} <!-- tcp type --> -<a-form layout="inline"> +<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }"> <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" }}'> <a-switch - :checked="inbound.stream.tcp.type === 'http'" - @change="checked => inbound.stream.tcp.type = checked ? 'http' : 'none'"> + :checked="inbound.stream.tcp.type === 'http'" + @change="checked => inbound.stream.tcp.type = checked ? 'http' : 'none'"> </a-switch> </a-form-item> </a-form> <!-- tcp request --> -<a-form v-if="inbound.stream.tcp.type === 'http'" layout="inline"> - <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> +<a-form v-if="inbound.stream.tcp.type === 'http'" :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }"> + <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> + <template slot="label">{{ i18n "pages.inbounds.stream.tcp.requestPath" }} + <a-button size="small" @click="inbound.stream.tcp.request.addPath('/')">+</a-button> + </template> + <template v-for="(path, index) in inbound.stream.tcp.request.path"> + <a-input v-model.trim="inbound.stream.tcp.request.path[index]"> + <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> + </template> + </a-form-item> + <a-form-item label='{{ i18n "pages.inbounds.stream.general.requestHeader" }}'> + <a-button size="small" @click="inbound.stream.tcp.request.addHeader('', '')">+</a-button> + </a-form-item> + <a-form-item :wrapper-col="{span:24}"> + <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> <!-- 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-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 label='{{ i18n "pages.inbounds.stream.tcp.responseHeader" }}'> + <a-button size="small" + @click="inbound.stream.tcp.response.addHeader('Content-Type', 'application/octet-stream')">+</a-button> + </a-form-item> + <a-form-item :wrapper-col="{span:24}"> + <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> </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 92e4e138..b5f2593e 100644 --- a/web/html/xui/form/stream/stream_ws.html +++ b/web/html/xui/form/stream/stream_ws.html @@ -1,28 +1,21 @@ {{define "form/streamWS"}} -<a-form layout="inline"> +<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }"> <a-form-item label="AcceptProxyProtocol"> <a-switch v-model="inbound.stream.ws.acceptProxyProtocol"></a-switch> </a-form-item> - <br> <a-form-item label='{{ i18n "path" }}'> <a-input v-model.trim="inbound.stream.ws.path"></a-input> </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.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> - <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.ws.removeHeader(index)">-</a-button> - </template> + <a-form-item label='{{ i18n "pages.inbounds.stream.general.requestHeader" }}'> + <a-button size="small" @click="inbound.stream.ws.addHeader()">+</a-button> + </a-form-item> + <a-form-item :wrapper-col="{span:24}"> + <a-input-group compact v-for="(header, index) in inbound.stream.ws.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.ws.removeHeader(index)">-</a-button> </a-input> </a-input-group> </a-form-item> |
