fix(kcp): allow MTU below 576 for xdns finalmask (#7132)

The inbound mKCP form and its schema refused an MTU below 576, but
Xray-core only requires at least 21. An XDNS finalmask with A/AAAA
record types needs a much smaller MTU, so the panel could not save a
configuration the core accepts.
This commit is contained in:
owltrainer
2026-11-23 23:38:44 +03:30
committed by GitHub
parent 5414381bf1
commit 477fbdf96e
2 changed files with 2 additions and 2 deletions
@@ -8,7 +8,7 @@ export default function KcpForm() {
return (
<>
<FormField name={['streamSettings', 'kcpSettings', 'mtu']} label="MTU">
<InputNumber min={576} max={1460} />
<InputNumber min={21} max={1460} />
</FormField>
<FormField
name={['streamSettings', 'kcpSettings', 'tti']}
+1 -1
View File
@@ -4,7 +4,7 @@ import { z } from 'zod';
// the JS side back to uplinkCapacity/downlinkCapacity on the wire. Defaults
// match xray-core's recommended values.
export const KcpStreamSettingsSchema = z.object({
mtu: z.number().int().min(576).max(1460).default(1350),
mtu: z.number().int().min(21).max(1460).default(1350),
tti: z.number().int().min(10).max(100).default(20),
uplinkCapacity: z.number().int().min(0).default(5),
downlinkCapacity: z.number().int().min(0).default(20),