mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-17 08:40:59 +00:00
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:
@@ -5,7 +5,7 @@ import { z } from 'zod';
|
||||
// plus optional QUIC tuning. The `settings` sub-object is polymorphic on
|
||||
// `type`; we model the wire-faithful shape with a permissive
|
||||
// record-of-unknown for `settings` and leave per-type tightening to
|
||||
// Step 6 — there are ~13 UDP mask types plus 3 TCP mask types, each with
|
||||
// Step 6 — there are 8 UDP mask types plus 3 TCP mask types, each with
|
||||
// distinct setting fields, and modeling them all as discriminated unions
|
||||
// here would dwarf the rest of the stream module without buying anything
|
||||
// the safety net doesn't already cover.
|
||||
@@ -21,19 +21,13 @@ export type TcpMask = z.infer<typeof TcpMaskSchema>;
|
||||
|
||||
export const UdpMaskTypeSchema = z.enum([
|
||||
'salamander',
|
||||
'mkcp-aes128gcm',
|
||||
'mkcp-original',
|
||||
'header-dns',
|
||||
'header-dtls',
|
||||
'header-srtp',
|
||||
'header-utp',
|
||||
'header-wechat',
|
||||
'header-wireguard',
|
||||
'mkcp-legacy',
|
||||
'header-custom',
|
||||
'xdns',
|
||||
'xicmp',
|
||||
'noise',
|
||||
'sudoku',
|
||||
'realm',
|
||||
]);
|
||||
export type UdpMaskType = z.infer<typeof UdpMaskTypeSchema>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user