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:
authorMHSanaei <ho3ein.sanaei@gmail.com>2026-04-20 17:38:33 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2026-04-20 17:55:06 +0300
commit04b4fb438487ada373fb3e6437b4cdb28b5174de (patch)
tree3814ae9d0e10d2ee8e061bd3ff5495aab0ca48c4 /web/html/form/stream
parentae5ad505d04fa347eb96a0d2bfb54ff541c3b709 (diff)
finalmask
Co-Authored-By: Alireza Ahmadi <alireza7@gmail.com>
Diffstat (limited to 'web/html/form/stream')
-rw-r--r--web/html/form/stream/stream_finalmask.html217
-rw-r--r--web/html/form/stream/stream_grpc.html2
-rw-r--r--web/html/form/stream/stream_httpupgrade.html11
-rw-r--r--web/html/form/stream/stream_hysteria.html39
-rw-r--r--web/html/form/stream/stream_kcp.html23
-rw-r--r--web/html/form/stream/stream_settings.html53
-rw-r--r--web/html/form/stream/stream_sockopt.html15
-rw-r--r--web/html/form/stream/stream_tcp.html29
-rw-r--r--web/html/form/stream/stream_ws.html8
-rw-r--r--web/html/form/stream/stream_xhttp.html67
10 files changed, 260 insertions, 204 deletions
diff --git a/web/html/form/stream/stream_finalmask.html b/web/html/form/stream/stream_finalmask.html
index 0b6418b7..be3761b7 100644
--- a/web/html/form/stream/stream_finalmask.html
+++ b/web/html/form/stream/stream_finalmask.html
@@ -1,84 +1,167 @@
{{define "form/streamFinalMask"}}
-<a-divider :style="{ margin: '5px 0 0' }"></a-divider>
-<a-form :colon="false" :label-col="{ md: {span:8} }"
- :wrapper-col="{ md: {span:14} }">
+<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }"
+ v-if="inbound.protocol == Protocols.HYSTERIA || inbound.stream.network == 'kcp'">
+ <a-divider :style="{ margin: '5px 0 0' }"></a-divider>
<a-form-item label="UDP Masks">
<a-button icon="plus" type="primary" size="small"
- @click="inbound.stream.addUdpMask(inbound.stream.network === 'kcp' ? 'mkcp-aes128gcm' : 'xdns')"></a-button>
+ @click="inbound.stream.addUdpMask(inbound.protocol === Protocols.HYSTERIA ? 'salamander' : 'mkcp-aes128gcm')"></a-button>
</a-form-item>
- <template
- v-if="inbound.stream.finalmask.udp && inbound.stream.finalmask.udp.length > 0">
- <a-form v-for="(mask, index) in inbound.stream.finalmask.udp"
- :key="index" :colon="false"
+ <template v-if="inbound.stream.finalmask.udp && inbound.stream.finalmask.udp.length > 0">
+ <a-form v-for="(mask, index) in inbound.stream.finalmask.udp" :key="index" :colon="false"
:label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
- <a-divider :style="{ margin: '0' }"> UDP Mask [[ index + 1 ]]
- <a-icon type="delete"
- @click="() => inbound.stream.delUdpMask(index)"
+ <a-divider :style="{ margin: '0' }">
+ UDP Mask [[ index + 1 ]]
+ <a-icon type="delete" @click="() => inbound.stream.delUdpMask(index)"
:style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"></a-icon>
</a-divider>
- <a-form-item label='Type'>
+ <a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
<a-select v-model="mask.type"
@change="(type) => { mask.settings = mask._getDefaultSettings(type, {}); if(inbound.stream.network === 'kcp') { inbound.stream.kcp.mtu = type === 'xdns' ? 900 : 1350; } }"
:dropdown-class-name="themeSwitcher.currentTheme">
- <!-- mKCP-specific masks -->
- <a-select-option v-if="inbound.stream.network === 'kcp'"
- value="mkcp-aes128gcm">
- mKCP AES-128-GCM</a-select-option>
- <a-select-option v-if="inbound.stream.network === 'kcp'"
- value="header-dns">
- Header DNS</a-select-option>
- <a-select-option v-if="inbound.stream.network === 'kcp'"
- value="header-dtls">
- Header DTLS 1.2</a-select-option>
- <a-select-option v-if="inbound.stream.network === 'kcp'"
- value="header-srtp">
- Header SRTP</a-select-option>
- <a-select-option v-if="inbound.stream.network === 'kcp'"
- value="header-utp">
- Header uTP</a-select-option>
- <a-select-option v-if="inbound.stream.network === 'kcp'"
- value="header-wechat">
- Header WeChat Video</a-select-option>
- <a-select-option v-if="inbound.stream.network === 'kcp'"
- value="header-wireguard">
- Header WireGuard</a-select-option>
- <a-select-option v-if="inbound.stream.network === 'kcp'"
- value="mkcp-original">
- mKCP Original</a-select-option>
- <a-select-option v-if="inbound.stream.network === 'kcp'"
- value="xicmp">
- xICMP (Experimental)</a-select-option>
- <!-- xDNS for TCP/WS/HTTPUpgrade/XHTTP/KCP -->
- <a-select-option
- v-if="['tcp', 'ws', 'httpupgrade', 'xhttp', 'kcp'].includes(inbound.stream.network)"
- value="xdns">
- xDNS (Experimental)</a-select-option>
+ <template v-if="inbound.protocol === Protocols.HYSTERIA">
+ <a-select-option value="salamander">Salamander (Hysteria2)</a-select-option>
+ </template>
+ <template v-else>
+ <a-select-option value="mkcp-aes128gcm">mKCP AES-128-GCM</a-select-option>
+ <a-select-option value="header-dns">Header DNS</a-select-option>
+ <a-select-option value="header-dtls">Header DTLS 1.2</a-select-option>
+ <a-select-option value="header-srtp">Header SRTP</a-select-option>
+ <a-select-option value="header-utp">Header uTP</a-select-option>
+ <a-select-option value="header-wechat">Header WeChat Video</a-select-option>
+ <a-select-option value="header-wireguard">Header WireGuard</a-select-option>
+ <a-select-option value="mkcp-original">mKCP Original</a-select-option>
+ <a-select-option value="xdns">xDNS</a-select-option>
+ <a-select-option value="xicmp">xICMP</a-select-option>
+ <a-select-option value="header-custom">Header Custom</a-select-option>
+ <a-select-option value="noise">Noise</a-select-option>
+ <a-select-option value="sudoku">Sudoku</a-select-option>
+ </template>
</a-select>
</a-form-item>
- <!-- Settings for password-based masks -->
- <a-form-item label='Password'
- v-if="['mkcp-aes128gcm'].includes(mask.type)">
- <a-input v-model.trim="mask.settings.password"
- placeholder="Obfuscation password"></a-input>
+ <a-form-item label="Password" v-if="['mkcp-aes128gcm', 'salamander', 'sudoku'].includes(mask.type)">
+ <a-input v-model.trim="mask.settings.password" placeholder="Obfuscation password"></a-input>
</a-form-item>
- <!-- Settings for domain-based masks -->
- <a-form-item label='Domain'
- v-if="['header-dns', 'xdns'].includes(mask.type)">
- <a-input v-model.trim="mask.settings.domain"
- placeholder="e.g., www.example.com"></a-input>
- </a-form-item>
- <!-- Settings for xICMP -->
- <a-form-item label='IP'
- v-if="mask.type === 'xicmp'">
- <a-input v-model.trim="mask.settings.ip"
- placeholder="e.g., 1.1.1.1"></a-input>
- </a-form-item>
- <a-form-item label='ID'
- v-if="mask.type === 'xicmp'">
- <a-input-number v-model.number="mask.settings.id"
- :min="0" :max="65535"></a-input-number>
+ <a-form-item label="Domain" v-if="['header-dns', 'xdns'].includes(mask.type)">
+ <a-input v-model.trim="mask.settings.domain" placeholder="e.g., www.example.com"></a-input>
</a-form-item>
+ <template v-if="mask.type === 'header-custom'">
+ <a-form-item label='Client'>
+ <a-icon type="plus" type="primary" size="small"
+ @click="mask.settings.client.push({rand: 0, randRange: '0-255', type: 'array', packet: []})" />
+ </a-form-item>
+ <template v-for="(c, index) in mask.settings.client" :key="index">
+ <a-divider :style="{ margin: '0' }"> Client [[ index + 1 ]]
+ <a-icon type="delete" @click="() => mask.settings.client.splice(index, 1)"
+ :style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"></a-icon>
+ </a-divider>
+ <a-form-item label='Rand'>
+ <a-input-number v-model.number="c.rand" />
+ </a-form-item>
+ <a-form-item label='Rand Range'>
+ <a-input v-model.trim="c.randRange" placeholder="0-255" />
+ </a-form-item>
+ <a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
+ <a-select v-model="c.type" :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option value="array">Array</a-select-option>
+ <a-select-option value="str">String</a-select-option>
+ <a-select-option value="hex">Hex</a-select-option>
+ <a-select-option value="base64">Base64</a-select-option>
+ </a-select>
+ </a-form-item>
+ <a-form-item label='Packet'>
+ <a-input v-model.trim="c.packet" placeholder="binary data" />
+ </a-form-item>
+ </template>
+ <a-divider :style="{ margin: '0' }"></a-divider>
+ <a-form-item label='Server'>
+ <a-icon type="plus" type="primary" size="small"
+ @click="mask.settings.server.push({rand: 0, randRange: '0-255', type: 'array', packet: []})" />
+ </a-form-item>
+ <template v-for="(s, index) in mask.settings.server" :key="index">
+ <a-divider :style="{ margin: '0' }"> Server [[ index + 1 ]]
+ <a-icon type="delete" @click="() => mask.settings.server.splice(index, 1)"
+ :style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"></a-icon>
+ </a-divider>
+ <a-form-item label='Rand'>
+ <a-input-number v-model.number="s.rand" />
+ </a-form-item>
+ <a-form-item label='Rand Range'>
+ <a-input v-model.trim="s.randRange" placeholder="0-255" />
+ </a-form-item>
+ <a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
+ <a-select v-model="s.type" :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option value="array">Array</a-select-option>
+ <a-select-option value="str">String</a-select-option>
+ <a-select-option value="hex">Hex</a-select-option>
+ <a-select-option value="base64">Base64</a-select-option>
+ </a-select>
+ </a-form-item>
+ <a-form-item label='Packet'>
+ <a-input v-model.trim="s.packet" placeholder="binary data" />
+ </a-form-item>
+ </template>
+ </template>
+ <template v-if="mask.type === 'noise'">
+ <a-form-item label='Reset'>
+ <a-input-number v-model.number="mask.settings.reset" :min="0" />
+ </a-form-item>
+ <a-form-item label='Noise'>
+ <a-icon type="plus" type="primary" size="small"
+ @click="mask.settings.noise.push({rand: '1-8192', randRange: '0-255', type: 'array', packet: '', delay: ''})" />
+ </a-form-item>
+ <template v-for="(n, index) in mask.settings.noise" :key="index">
+ <a-divider :style="{ margin: '0' }"> Noise [[ index + 1 ]]
+ <a-icon type="delete" @click="() => mask.settings.noise.splice(index, 1)"
+ :style="{ color: 'rgb(255, 77, 79)', cursor: 'pointer' }"></a-icon>
+ </a-divider>
+ <a-form-item label='Rand'>
+ <a-input v-model.trim="n.rand" placeholder="1-8192" />
+ </a-form-item>
+ <a-form-item label='Rand Range'>
+ <a-input v-model.trim="n.randRange" placeholder="0-255" />
+ </a-form-item>
+ <a-form-item label='{{ i18n "pages.xray.outbound.type" }}'>
+ <a-select v-model="n.type" :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option value="array">Array</a-select-option>
+ <a-select-option value="str">String</a-select-option>
+ <a-select-option value="hex">Hex</a-select-option>
+ <a-select-option value="base64">Base64</a-select-option>
+ </a-select>
+ </a-form-item>
+ <a-form-item label='Packet'>
+ <a-input v-model.trim="n.packet" placeholder="binary data" />
+ </a-form-item>
+ <a-form-item label='Delay'>
+ <a-input v-model.trim="n.delay" placeholder="10-20" />
+ </a-form-item>
+ </template>
+ </template>
+ <template v-if="mask.type === 'sudoku'">
+ <a-form-item label='ASCII'>
+ <a-input v-model.trim="mask.settings.ascii" placeholder="ASCII" />
+ </a-form-item>
+ <a-form-item label='Custom Table'>
+ <a-input v-model.trim="mask.settings.customTable" placeholder="Custom Table" />
+ </a-form-item>
+ <a-form-item label='Custom Tables'>
+ <a-input v-model.trim="mask.settings.customTables" placeholder="Custom Tables" />
+ </a-form-item>
+ <a-form-item label='Padding Min'>
+ <a-input-number v-model.number="mask.settings.paddingMin" :min="0" />
+ </a-form-item>
+ <a-form-item label='Padding Max'>
+ <a-input-number v-model.number="mask.settings.paddingMax" :min="0" />
+ </a-form-item>
+ </template>
+ <template v-if="mask.type === 'xicmp'">
+ <a-form-item label='IP'>
+ <a-input v-model.trim="mask.settings.ip" placeholder="0.0.0.0" />
+ </a-form-item>
+ <a-form-item label='ID'>
+ <a-input-number v-model.number="mask.settings.id" :min="0" />
+ </a-form-item>
+ </template>
</a-form>
</template>
</a-form>
-{{end}}
+{{end}} \ No newline at end of file
diff --git a/web/html/form/stream/stream_grpc.html b/web/html/form/stream/stream_grpc.html
index e74a3c3f..1e3d5bd3 100644
--- a/web/html/form/stream/stream_grpc.html
+++ b/web/html/form/stream/stream_grpc.html
@@ -10,4 +10,4 @@
<a-switch v-model="inbound.stream.grpc.multiMode"></a-switch>
</a-form-item>
</a-form>
-{{end}}
+{{end}} \ No newline at end of file
diff --git a/web/html/form/stream/stream_httpupgrade.html b/web/html/form/stream/stream_httpupgrade.html
index aa433389..3b2398b6 100644
--- a/web/html/form/stream/stream_httpupgrade.html
+++ b/web/html/form/stream/stream_httpupgrade.html
@@ -14,13 +14,16 @@
</a-form-item>
<a-form-item :wrapper-col="{span:24}">
<a-input-group compact v-for="(header, index) in inbound.stream.httpupgrade.headers">
- <a-input :style="{ width: '50%' }" v-model.trim="header.name" placeholder='{{ i18n "pages.inbounds.stream.general.name"}}'>
+ <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 icon="minus" slot="addonAfter" size="small" @click="inbound.stream.httpupgrade.removeHeader(index)"></a-button>
+ <a-input :style="{ width: '50%' }" v-model.trim="header.value"
+ placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'>
+ <a-button icon="minus" slot="addonAfter" size="small"
+ @click="inbound.stream.httpupgrade.removeHeader(index)"></a-button>
</a-input>
</a-input-group>
</a-form-item>
</a-form>
-{{end}}
+{{end}} \ No newline at end of file
diff --git a/web/html/form/stream/stream_hysteria.html b/web/html/form/stream/stream_hysteria.html
index 5e43d462..b2979356 100644
--- a/web/html/form/stream/stream_hysteria.html
+++ b/web/html/form/stream/stream_hysteria.html
@@ -1,12 +1,10 @@
{{define "form/streamHysteria"}}
-<a-form :colon="false" :label-col="{ md: {span:8} }"
- :wrapper-col="{ md: {span:14} }">
+<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
<a-form-item label='Auth Password'>
<a-input v-model.trim="inbound.stream.hysteria.auth"></a-input>
</a-form-item>
<a-form-item label='UDP Idle Timeout'>
- <a-input-number v-model.number="inbound.stream.hysteria.udpIdleTimeout"
- :min="0"></a-input-number>
+ <a-input-number v-model.number="inbound.stream.hysteria.udpIdleTimeout" :min="0"></a-input-number>
</a-form-item>
<a-form-item label='Masquerade'>
<a-switch v-model="inbound.stream.hysteria.masqueradeSwitch"></a-switch>
@@ -21,42 +19,32 @@
<a-select-option value="string">String</a-select-option>
</a-select>
</a-form-item>
- <a-form-item label='Dir'
- v-if="inbound.stream.hysteria.masquerade.type === 'file'">
- <a-input
- v-model.trim="inbound.stream.hysteria.masquerade.dir"></a-input>
+ <a-form-item label='Dir' v-if="inbound.stream.hysteria.masquerade.type === 'file'">
+ <a-input v-model.trim="inbound.stream.hysteria.masquerade.dir"></a-input>
</a-form-item>
<template v-if="inbound.stream.hysteria.masquerade.type === 'proxy'">
<a-form-item label='URL'>
- <a-input
- v-model.trim="inbound.stream.hysteria.masquerade.url"></a-input>
+ <a-input v-model.trim="inbound.stream.hysteria.masquerade.url"></a-input>
</a-form-item>
<a-form-item label='Rewrite Host'>
- <a-switch
- v-model="inbound.stream.hysteria.masquerade.rewriteHost"></a-switch>
+ <a-switch v-model="inbound.stream.hysteria.masquerade.rewriteHost"></a-switch>
</a-form-item>
<a-form-item label='Insecure'>
- <a-switch
- v-model="inbound.stream.hysteria.masquerade.insecure"></a-switch>
+ <a-switch v-model="inbound.stream.hysteria.masquerade.insecure"></a-switch>
</a-form-item>
</template>
<template v-if="inbound.stream.hysteria.masquerade.type === 'string'">
<a-form-item label='Content'>
- <a-input
- v-model.trim="inbound.stream.hysteria.masquerade.content"></a-input>
+ <a-input v-model.trim="inbound.stream.hysteria.masquerade.content"></a-input>
</a-form-item>
- <a-form-item
- label='{{ i18n "pages.inbounds.stream.tcp.requestHeader" }}'>
- <a-button size="small"
- @click="inbound.stream.hysteria.masquerade.addHeader('', '')">+</a-button>
+ <a-form-item label='{{ i18n "pages.inbounds.stream.tcp.requestHeader" }}'>
+ <a-button size="small" @click="inbound.stream.hysteria.masquerade.addHeader('', '')">+</a-button>
</a-form-item>
<a-form-item :wrapper-col="{span:24}">
- <a-input-group compact
- v-for="(header, index) in inbound.stream.hysteria.masquerade.headers">
+ <a-input-group compact v-for="(header, index) in inbound.stream.hysteria.masquerade.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>
+ <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" }}'>
@@ -66,8 +54,7 @@
</a-input-group>
</a-form-item>
<a-form-item label='Status Code'>
- <a-input-number
- v-model.number="inbound.stream.hysteria.masquerade.statusCode"></a-input-number>
+ <a-input-number v-model.number="inbound.stream.hysteria.masquerade.statusCode"></a-input-number>
</a-form-item>
</template>
</template>
diff --git a/web/html/form/stream/stream_kcp.html b/web/html/form/stream/stream_kcp.html
index 11f89ebd..e74dd3ea 100644
--- a/web/html/form/stream/stream_kcp.html
+++ b/web/html/form/stream/stream_kcp.html
@@ -1,32 +1,25 @@
{{define "form/streamKCP"}}
-<a-form :colon="false" :label-col="{ md: {span:8} }"
- :wrapper-col="{ md: {span:14} }">
+<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
<a-form-item label='MTU'>
- <a-input-number v-model.number="inbound.stream.kcp.mtu" :min="576"
- :max="1460"></a-input-number>
+ <a-input-number v-model.number="inbound.stream.kcp.mtu" :min="576" :max="1460"></a-input-number>
</a-form-item>
<a-form-item label='TTI (ms)'>
- <a-input-number v-model.number="inbound.stream.kcp.tti" :min="10"
- :max="100"></a-input-number>
+ <a-input-number v-model.number="inbound.stream.kcp.tti" :min="10" :max="100"></a-input-number>
</a-form-item>
<a-form-item label='Uplink (MB/s)'>
- <a-input-number v-model.number="inbound.stream.kcp.upCap"
- :min="0"></a-input-number>
+ <a-input-number v-model.number="inbound.stream.kcp.upCap" :min="0"></a-input-number>
</a-form-item>
<a-form-item label='Downlink (MB/s)'>
- <a-input-number v-model.number="inbound.stream.kcp.downCap"
- :min="0"></a-input-number>
+ <a-input-number v-model.number="inbound.stream.kcp.downCap" :min="0"></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"
- :min="0"></a-input-number>
+ <a-input-number v-model.number="inbound.stream.kcp.readBuffer" :min="0"></a-input-number>
</a-form-item>
<a-form-item label='Write Buffer (MB)'>
- <a-input-number v-model.number="inbound.stream.kcp.writeBuffer"
- :min="0"></a-input-number>
+ <a-input-number v-model.number="inbound.stream.kcp.writeBuffer" :min="0"></a-input-number>
</a-form-item>
</a-form>
-{{end}}
+{{end}} \ No newline at end of file
diff --git a/web/html/form/stream/stream_settings.html b/web/html/form/stream/stream_settings.html
index 700fe793..c0397d96 100644
--- a/web/html/form/stream/stream_settings.html
+++ b/web/html/form/stream/stream_settings.html
@@ -1,65 +1,62 @@
{{define "form/streamSettings"}}
<!-- select stream network -->
-<a-form :colon="false" :label-col="{ md: {span:8} }"
- :wrapper-col="{ md: {span:14} }"
- v-if="inbound.protocol != Protocols.HYSTERIA">
- <a-form-item label='{{ i18n "transmission" }}'>
- <a-select v-model="inbound.stream.network" :style="{ width: '75%' }"
- @change="streamNetworkChange"
- :dropdown-class-name="themeSwitcher.currentTheme">
- <a-select-option value="tcp">TCP (RAW)</a-select-option>
- <a-select-option value="kcp">mKCP</a-select-option>
- <a-select-option value="ws">WebSocket</a-select-option>
- <a-select-option value="grpc">gRPC</a-select-option>
- <a-select-option value="httpupgrade">HTTPUpgrade</a-select-option>
- <a-select-option value="xhttp">XHTTP</a-select-option>
- </a-select>
- </a-form-item>
+<a-form :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }"
+ v-if="inbound.protocol != Protocols.HYSTERIA">
+ <a-form-item label='{{ i18n "transmission" }}'>
+ <a-select v-model="inbound.stream.network" :style="{ width: '75%' }" @change="streamNetworkChange"
+ :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option value="tcp">TCP (RAW)</a-select-option>
+ <a-select-option value="kcp">mKCP</a-select-option>
+ <a-select-option value="ws">WebSocket</a-select-option>
+ <a-select-option value="grpc">gRPC</a-select-option>
+ <a-select-option value="httpupgrade">HTTPUpgrade</a-select-option>
+ <a-select-option value="xhttp">XHTTP</a-select-option>
+ </a-select>
+ </a-form-item>
</a-form>
<!-- tcp -->
<template v-if="inbound.stream.network === 'tcp'">
- {{template "form/streamTCP"}}
+ {{template "form/streamTCP"}}
</template>
<!-- kcp -->
<template v-if="inbound.stream.network === 'kcp'">
- {{template "form/streamKCP"}}
+ {{template "form/streamKCP"}}
</template>
<!-- ws -->
<template v-if="inbound.stream.network === 'ws'">
- {{template "form/streamWS"}}
+ {{template "form/streamWS"}}
</template>
<!-- grpc -->
<template v-if="inbound.stream.network === 'grpc'">
- {{template "form/streamGRPC"}}
+ {{template "form/streamGRPC"}}
</template>
<!-- hysteria -->
<template v-if="inbound.stream.network === 'hysteria'">
- {{template "form/streamHysteria"}}
+ {{template "form/streamHysteria"}}
</template>
<!-- httpupgrade -->
<template v-if="inbound.stream.network === 'httpupgrade'">
- {{template "form/streamHTTPUpgrade"}}
+ {{template "form/streamHTTPUpgrade"}}
</template>
<!-- xhttp -->
<template v-if="inbound.stream.network === 'xhttp'">
- {{template "form/streamXHTTP"}}
+ {{template "form/streamXHTTP"}}
</template>
<!-- sockopt -->
<template>
- {{template "form/streamSockopt"}}
+ {{template "form/streamSockopt"}}
</template>
-<!-- finalmask - only for TCP, WS, HTTPUpgrade, XHTTP, mKCP -->
-<template
- v-if="['tcp', 'ws', 'httpupgrade', 'xhttp', 'kcp'].includes(inbound.stream.network)">
- {{template "form/streamFinalMask"}}
+<!-- finalmask -->
+<template>
+ {{template "form/streamFinalMask"}}
</template>
-{{end}}
+{{end}} \ No newline at end of file
diff --git a/web/html/form/stream/stream_sockopt.html b/web/html/form/stream/stream_sockopt.html
index 062b83df..29f2d743 100644
--- a/web/html/form/stream/stream_sockopt.html
+++ b/web/html/form/stream/stream_sockopt.html
@@ -39,17 +39,20 @@
<a-switch v-model.trim="inbound.stream.sockopt.V6Only"></a-switch>
</a-form-item>
<a-form-item label='Domain Strategy'>
- <a-select v-model="inbound.stream.sockopt.domainStrategy" :style="{ width: '50%' }" :dropdown-class-name="themeSwitcher.currentTheme">
- <a-select-option v-for="key in DOMAIN_STRATEGY_OPTION" :value="key">[[ key ]]</a-select-option>
+ <a-select v-model="inbound.stream.sockopt.domainStrategy" :style="{ width: '50%' }"
+ :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option v-for="key in DOMAIN_STRATEGY_OPTION" :value="key">[[ key ]]</a-select-option>
</a-select>
</a-form-item>
<a-form-item label='TCP Congestion'>
- <a-select v-model="inbound.stream.sockopt.tcpcongestion" :style="{ width: '50%' }" :dropdown-class-name="themeSwitcher.currentTheme">
- <a-select-option v-for="key in TCP_CONGESTION_OPTION" :value="key">[[ key ]]</a-select-option>
+ <a-select v-model="inbound.stream.sockopt.tcpcongestion" :style="{ width: '50%' }"
+ :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select-option v-for="key in TCP_CONGESTION_OPTION" :value="key">[[ key ]]</a-select-option>
</a-select>
</a-form-item>
<a-form-item label="TProxy">
- <a-select v-model="inbound.stream.sockopt.tproxy" :style="{ width: '50%' }" :dropdown-class-name="themeSwitcher.currentTheme">
+ <a-select v-model="inbound.stream.sockopt.tproxy" :style="{ width: '50%' }"
+ :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">TProxy</a-select-option>
@@ -72,4 +75,4 @@
</a-form-item>
</template>
</a-form>
-{{end}}
+{{end}} \ No newline at end of file
diff --git a/web/html/form/stream/stream_tcp.html b/web/html/form/stream/stream_tcp.html
index 3024ef77..2fb69cb0 100644
--- a/web/html/form/stream/stream_tcp.html
+++ b/web/html/form/stream/stream_tcp.html
@@ -5,11 +5,13 @@
<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'"></a-switch>
+ <a-switch :checked="inbound.stream.tcp.type === 'http'"
+ @change="checked => inbound.stream.tcp.type = checked ? 'http' : 'none'"></a-switch>
</a-form-item>
</a-form>
-<a-form v-if="inbound.stream.tcp.type === 'http'" :colon="false" :label-col="{ md: {span:8} }" :wrapper-col="{ md: {span:14} }">
+<a-form v-if="inbound.stream.tcp.type === 'http'" :colon="false" :label-col="{ md: {span:8} }"
+ :wrapper-col="{ md: {span:14} }">
<!-- tcp request -->
<a-divider :style="{ margin: '0' }">{{ i18n "pages.inbounds.stream.general.request" }}</a-divider>
<a-form-item label='{{ i18n "pages.inbounds.stream.tcp.version" }}'>
@@ -24,7 +26,8 @@
</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 icon="minus" size="small" slot="addonAfter" @click="inbound.stream.tcp.request.removePath(index)" v-if="inbound.stream.tcp.request.path.length>1"></a-button>
+ <a-button icon="minus" 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>
@@ -33,11 +36,14 @@
</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" }}'>
+ <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 icon="minus" slot="addonAfter" size="small" @click="inbound.stream.tcp.request.removeHeader(index)"></a-button>
+ <a-input :style="{ width: '50%' }" v-model.trim="header.value"
+ placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'>
+ <a-button icon="minus" slot="addonAfter" size="small"
+ @click="inbound.stream.tcp.request.removeHeader(index)"></a-button>
</a-input>
</a-input-group>
</a-form-item>
@@ -54,14 +60,17 @@
<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 icon="plus" size="small" @click="inbound.stream.tcp.response.addHeader('Content-Type', 'application/octet-stream')"></a-button>
+ <a-button icon="plus" 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" }}'>
+ <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-input :style="{ width: '50%' }" v-model.trim="header.value"
+ placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'>
<template slot="addonAfter">
<a-button icon="minus" size="small" @click="inbound.stream.tcp.response.removeHeader(index)"></a-button>
</template>
@@ -69,4 +78,4 @@
</a-input-group>
</a-form-item>
</a-form>
-{{end}}
+{{end}} \ No newline at end of file
diff --git a/web/html/form/stream/stream_ws.html b/web/html/form/stream/stream_ws.html
index 4c71a516..d3885ad6 100644
--- a/web/html/form/stream/stream_ws.html
+++ b/web/html/form/stream/stream_ws.html
@@ -17,13 +17,15 @@
</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"}}'>
+ <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-input :style="{ width: '50%' }" v-model.trim="header.value"
+ placeholder='{{ i18n "pages.inbounds.stream.general.value" }}'>