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-03-04 15:39:14 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2026-03-04 15:39:14 +0300
commit34d88850754351c680ba7a26753684be83524e0a (patch)
tree3735a94214991592f1ef25f8ebfd0fd5ce37bc58
parent57409964369a239093998a98fba9167c198db01c (diff)
Adjust KCP MTU when selecting xDNS mask
-rw-r--r--web/html/form/outbound.html6
-rw-r--r--web/html/form/stream/stream_finalmask.html6
2 files changed, 6 insertions, 6 deletions
diff --git a/web/html/form/outbound.html b/web/html/form/outbound.html
index a2de920a..21bc11fc 100644
--- a/web/html/form/outbound.html
+++ b/web/html/form/outbound.html
@@ -612,7 +612,7 @@
</a-divider>
<a-form-item label='Type'>
<a-select v-model="mask.type"
- @change="(type) => mask.settings = mask._getDefaultSettings(type, {})"
+ @change="(type) => { mask.settings = mask._getDefaultSettings(type, {}); if(outbound.stream.network === 'kcp') { outbound.stream.kcp.mtu = type === 'xdns' ? 900 : 1350; } }"
:dropdown-class-name="themeSwitcher.currentTheme">
<!-- Salamander for Hysteria2 only -->
<a-select-option v-if="outbound.protocol === Protocols.Hysteria"
@@ -643,9 +643,9 @@
<a-select-option v-if="outbound.stream.network === 'kcp'"
value="mkcp-original">
mKCP Original</a-select-option>
- <!-- xDNS for TCP/WS/HTTPUpgrade/XHTTP -->
+ <!-- xDNS for TCP/WS/HTTPUpgrade/XHTTP/KCP -->
<a-select-option
- v-if="['tcp', 'ws', 'httpupgrade', 'xhttp'].includes(outbound.stream.network)"
+ v-if="['tcp', 'ws', 'httpupgrade', 'xhttp', 'kcp'].includes(outbound.stream.network)"
value="xdns">
xDNS (Experimental)</a-select-option>
</a-select>
diff --git a/web/html/form/stream/stream_finalmask.html b/web/html/form/stream/stream_finalmask.html
index 35962dfa..0b6418b7 100644
--- a/web/html/form/stream/stream_finalmask.html
+++ b/web/html/form/stream/stream_finalmask.html
@@ -18,7 +18,7 @@
</a-divider>
<a-form-item label='Type'>
<a-select v-model="mask.type"
- @change="(type) => mask.settings = mask._getDefaultSettings(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'"
@@ -48,9 +48,9 @@
<a-select-option v-if="inbound.stream.network === 'kcp'"
value="xicmp">
xICMP (Experimental)</a-select-option>
- <!-- xDNS for TCP/WS/HTTPUpgrade/XHTTP -->
+ <!-- xDNS for TCP/WS/HTTPUpgrade/XHTTP/KCP -->
<a-select-option
- v-if="['tcp', 'ws', 'httpupgrade', 'xhttp'].includes(inbound.stream.network)"
+ v-if="['tcp', 'ws', 'httpupgrade', 'xhttp', 'kcp'].includes(inbound.stream.network)"
value="xdns">
xDNS (Experimental)</a-select-option>
</a-select>