Skip to content

Commit 34d8885

Browse files
committed
Adjust KCP MTU when selecting xDNS mask
1 parent 5740996 commit 34d8885

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

web/html/form/outbound.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@
612612
</a-divider>
613613
<a-form-item label='Type'>
614614
<a-select v-model="mask.type"
615-
@change="(type) => mask.settings = mask._getDefaultSettings(type, {})"
615+
@change="(type) => { mask.settings = mask._getDefaultSettings(type, {}); if(outbound.stream.network === 'kcp') { outbound.stream.kcp.mtu = type === 'xdns' ? 900 : 1350; } }"
616616
:dropdown-class-name="themeSwitcher.currentTheme">
617617
<!-- Salamander for Hysteria2 only -->
618618
<a-select-option v-if="outbound.protocol === Protocols.Hysteria"
@@ -643,9 +643,9 @@
643643
<a-select-option v-if="outbound.stream.network === 'kcp'"
644644
value="mkcp-original">
645645
mKCP Original</a-select-option>
646-
<!-- xDNS for TCP/WS/HTTPUpgrade/XHTTP -->
646+
<!-- xDNS for TCP/WS/HTTPUpgrade/XHTTP/KCP -->
647647
<a-select-option
648-
v-if="['tcp', 'ws', 'httpupgrade', 'xhttp'].includes(outbound.stream.network)"
648+
v-if="['tcp', 'ws', 'httpupgrade', 'xhttp', 'kcp'].includes(outbound.stream.network)"
649649
value="xdns">
650650
xDNS (Experimental)</a-select-option>
651651
</a-select>

web/html/form/stream/stream_finalmask.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</a-divider>
1919
<a-form-item label='Type'>
2020
<a-select v-model="mask.type"
21-
@change="(type) => mask.settings = mask._getDefaultSettings(type, {})"
21+
@change="(type) => { mask.settings = mask._getDefaultSettings(type, {}); if(inbound.stream.network === 'kcp') { inbound.stream.kcp.mtu = type === 'xdns' ? 900 : 1350; } }"
2222
:dropdown-class-name="themeSwitcher.currentTheme">
2323
<!-- mKCP-specific masks -->
2424
<a-select-option v-if="inbound.stream.network === 'kcp'"
@@ -48,9 +48,9 @@
4848
<a-select-option v-if="inbound.stream.network === 'kcp'"
4949
value="xicmp">
5050
xICMP (Experimental)</a-select-option>
51-
<!-- xDNS for TCP/WS/HTTPUpgrade/XHTTP -->
51+
<!-- xDNS for TCP/WS/HTTPUpgrade/XHTTP/KCP -->
5252
<a-select-option
53-
v-if="['tcp', 'ws', 'httpupgrade', 'xhttp'].includes(inbound.stream.network)"
53+
v-if="['tcp', 'ws', 'httpupgrade', 'xhttp', 'kcp'].includes(inbound.stream.network)"
5454
value="xdns">
5555
xDNS (Experimental)</a-select-option>
5656
</a-select>

0 commit comments

Comments
 (0)