mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-17 18:45:03 +03:00
fix(inbound): remove stale mkcp-legacy finalmask when switching away from mKCP
Switching the transport to mKCP auto-seeds a mkcp-legacy entry into finalmask.udp, but switching back to another transport only dropped the kcpSettings blob and left the mask behind. It survived downstream pruning (finalmask.udp was non-empty) and bled into every client share link. Strip auto-seeded mkcp-legacy entries from finalmask.udp whenever the network changes away from kcp, leaving user-authored masks intact. Fixes #5221
This commit is contained in:
@@ -749,6 +749,12 @@ export default function InboundFormModal({
|
|||||||
udp: [...udp, { type: 'mkcp-legacy', settings: { header: '', value: '' } }],
|
udp: [...udp, { type: 'mkcp-legacy', settings: { header: '', value: '' } }],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
const fm = cleaned.finalmask as Record<string, unknown> | undefined;
|
||||||
|
if (fm && Array.isArray(fm.udp)) {
|
||||||
|
const udp = (fm.udp as unknown[]).filter((m) => (m as { type?: string })?.type !== 'mkcp-legacy');
|
||||||
|
cleaned.finalmask = { ...fm, udp };
|
||||||
|
}
|
||||||
}
|
}
|
||||||
form.setFieldValue('streamSettings', cleaned);
|
form.setFieldValue('streamSettings', cleaned);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user