feat(finalmask): sync transport with upstream Xray core changes

Consolidate the eight legacy mKCP/header UDP mask types into a single mkcp-legacy type ({header, value}), simplify xicmp to {dgram, ips}, and add the new realm UDP mask type, matching the updated Xray-core wire format. Update the FinalMask schema enum, the transport form, the mKCP seeding default, and the backend KCP share-link translation. Refresh golden fixtures/snapshots and add backend coverage for the mapping.
This commit is contained in:
MHSanaei
2026-06-01 10:12:51 +02:00
parent c5ff166056
commit 32f96298f8
9 changed files with 154 additions and 79 deletions
@@ -622,7 +622,7 @@ export default function InboundFormModal({
}
cleaned[`${next}Settings`] = newStreamSlice(next);
// mKCP wants a UDP mask wrapper on the FinalMask side; seed it with
// `mkcp-original` so the inbound boots with a sensible default
// `mkcp-legacy` so the inbound boots with a sensible default
// instead of unobfuscated mKCP traffic. The user can still edit or
// clear the mask via the FinalMask section.
if (next === 'kcp') {
@@ -630,12 +630,12 @@ export default function InboundFormModal({
const udp = Array.isArray(fm.udp) ? (fm.udp as unknown[]) : [];
const hasMkcp = udp.some((m) => {
const entry = m as { type?: string };
return entry?.type === 'mkcp-original';
return entry?.type === 'mkcp-legacy';
});
if (!hasMkcp) {
cleaned.finalmask = {
...fm,
udp: [...udp, { type: 'mkcp-original', settings: {} }],
udp: [...udp, { type: 'mkcp-legacy', settings: { header: '', value: '' } }],
};
}
}
@@ -153,7 +153,7 @@ export function useInboundColumns({
title: t('clients'),
key: 'clients',
align: 'left',
width: 80,
width: 110,
render: (_, record) => {
const cc = clientCount[record.id];
if (!cc) return null;