diff options
| author | MHSanaei <mc.sanaei@gmail.com> | 2023-02-09 22:18:06 +0300 |
|---|---|---|
| committer | MHSanaei <mc.sanaei@gmail.com> | 2023-02-09 22:18:06 +0300 |
| commit | b73e4173a3c1e69e02ad6b4e3b43e425e57a5be9 (patch) | |
| tree | d95d2f5e903d97082e11eb9f9023c165b1bde388 /web/html/xui/form/stream | |
3x-ui
Diffstat (limited to 'web/html/xui/form/stream')
| -rw-r--r-- | web/html/xui/form/stream/stream_grpc.html | 7 | ||||
| -rw-r--r-- | web/html/xui/form/stream/stream_http.html | 12 | ||||
| -rw-r--r-- | web/html/xui/form/stream/stream_kcp.html | 38 | ||||
| -rw-r--r-- | web/html/xui/form/stream/stream_quic.html | 24 | ||||
| -rw-r--r-- | web/html/xui/form/stream/stream_settings.html | 45 | ||||
| -rw-r--r-- | web/html/xui/form/stream/stream_tcp.html | 86 | ||||
| -rw-r--r-- | web/html/xui/form/stream/stream_ws.html | 33 |
7 files changed, 245 insertions, 0 deletions
diff --git a/web/html/xui/form/stream/stream_grpc.html b/web/html/xui/form/stream/stream_grpc.html new file mode 100644 index 00000000..205a4c84 --- /dev/null +++ b/web/html/xui/form/stream/stream_grpc.html @@ -0,0 +1,7 @@ +{{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> +{{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 new file mode 100644 index 00000000..ad30c45a --- /dev/null +++ b/web/html/xui/form/stream/stream_http.html @@ -0,0 +1,12 @@ +{{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> +</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 new file mode 100644 index 00000000..ff14d5b7 --- /dev/null +++ b/web/html/xui/form/stream/stream_kcp.html @@ -0,0 +1,38 @@ +{{define "form/streamKCP"}} +<a-form layout="inline"> + <a-form-item label='{{ i18n "camouflage" }}'> + <a-select v-model="inbound.stream.kcp.type" style="width: 280px;"> + <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> + <a-form-item label='{{ i18n "password" }}'> + <a-input v-model.number="inbound.stream.kcp.seed"></a-input> + </a-form-item> + <a-form-item label="mtu"> + <a-input type="number" v-model.number="inbound.stream.kcp.mtu"></a-input> + </a-form-item> + <a-form-item label="tti (ms)"> + <a-input type="number" v-model.number="inbound.stream.kcp.tti"></a-input> + </a-form-item> + <a-form-item label="uplink capacity (MB/S)"> + <a-input type="number" v-model.number="inbound.stream.kcp.upCap"></a-input> + </a-form-item> + <a-form-item label="downlink capacity (MB/S)"> + <a-input type="number" v-model.number="inbound.stream.kcp.downCap"></a-input> + </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 size (MB)"> + <a-input type="number" v-model.number="inbound.stream.kcp.readBuffer"></a-input> + </a-form-item> + <a-form-item label="write buffer size (MB)"> + <a-input type="number" v-model.number="inbound.stream.kcp.writeBuffer"></a-input> + </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 new file mode 100644 index 00000000..942461ad --- /dev/null +++ b/web/html/xui/form/stream/stream_quic.html @@ -0,0 +1,24 @@ +{{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;"> + <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" style="width: 280px;"> + <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> +</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 new file mode 100644 index 00000000..7fc9ad2c --- /dev/null +++ b/web/html/xui/form/stream/stream_settings.html @@ -0,0 +1,45 @@ +{{define "form/streamSettings"}} +<!-- select stream network --> +<a-form layout="inline"> + <a-form-item label='{{ i18n "transmission" }}'> + <a-select v-model="inbound.stream.network" @change="streamNetworkChange"> + <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> + <a-select-option value="http">http</a-select-option> + <a-select-option value="quic">quic</a-select-option> + <a-select-option value="grpc">grpc</a-select-option> + </a-select> + </a-form-item> +</a-form> + +<!-- tcp --> +<template v-if="inbound.stream.network === 'tcp'"> + {{template "form/streamTCP"}} +</template> + +<!-- kcp --> +<template v-if="inbound.stream.network === 'kcp'"> + {{template "form/streamKCP"}} +</template> + +<!-- ws --> +<template v-if="inbound.stream.network === 'ws'"> + {{template "form/streamWS"}} +</template> + +<!-- http --> +<template v-if="inbound.stream.network === 'http'"> + {{template "form/streamHTTP"}} +</template> + +<!-- quic --> +<template v-if="inbound.stream.network === 'quic'"> + {{template "form/streamQUIC"}} +</template> + +<!-- grpc --> +<template v-if="inbound.stream.network === 'grpc'"> + {{template "form/streamGRPC"}} +</template> +{{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 new file mode 100644 index 00000000..fc19506d --- /dev/null +++ b/web/html/xui/form/stream/stream_tcp.html @@ -0,0 +1,86 @@ +{{define "form/streamTCP"}} +<!-- tcp type --> +<a-form layout="inline"> + <a-form-item label="acceptProxyProtocol"> + <a-switch v-model="inbound.stream.tcp.acceptProxyProtocol"></a-switch> + </a-form-item> + <a-form-item label="http camouflage"> + <a-switch + :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"> + <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> + <a-form-item label='{{ i18n "pages.inbounds.stream.general.requestHeader" }}'> + <a-row> + <a-button size="small" + @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 size="small" + @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 label='{{ i18n "pages.inbounds.stream.tcp.responseHeader" }}'> + <a-row> + <a-button size="small" + @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 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 new file mode 100644 index 00000000..46d6f7a3 --- /dev/null +++ b/web/html/xui/form/stream/stream_ws.html @@ -0,0 +1,33 @@ +{{define "form/streamWS"}} +<a-form layout="inline"> + <a-form-item label="acceptProxyProtocol"> + <a-switch v-model="inbound.stream.ws.acceptProxyProtocol"></a-switch> + </a-form-item> +</a-form> +<a-form layout="inline"> + <a-form-item label='{{ i18n "path" }}'> + <a-input v-model.trim="inbound.stream.ws.path"></a-input> + </a-form-item> + <a-form-item label='{{ i18n "pages.inbounds.stream.general.requestHeader" }}'> + <a-row> + <a-button size="small" + @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 size="small" + @click="inbound.stream.ws.removeHeader(index)"> + - + </a-button> + </template> + </a-input> + </a-input-group> + </a-form-item> +</a-form> +{{end}}
\ No newline at end of file |
