mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-09-17 15:47:14 +00:00
feat(xray): update xray-core to v26.9.9 and follow the udpHop move
Bump xtls/xray-core to 52a412d9e2f5 (v26.9.9) and the three binary pins in DockerInit.sh and release.yml in lockstep. Upstream moved UDP port hopping out of finalmask.quicParams.udpHop and into a standalone "udphop" UDP mask with a different shape (mode / interval / remotePorts / remoteIPs). The old key is gone from QuicParams, and since the config loader ignores unknown fields it is now silently dropped rather than rejected — port hopping just stops. The panel adapts where that key was live: - Both link importers rebuilt quicParams.udpHop from the standard mport param, so an imported hysteria2 link produced an outbound that no longer hops. They now emit a udphop mask in intervalremote mode, which is what the old key did. The mode is required: UDPHop.Build() rejects an empty or unknown one. - validFinalMaskUDPTypes and UdpMaskTypeSchema learn "udphop", otherwise the Go link generator strips the mask from every link and sub, and Zod strips it on the next form round trip. - mport generation (Go and frontend) reads the mask first and keeps reading the legacy key, so inbounds stored before the upgrade still advertise their range. On an inbound the old key was always inert — only hysteria's dialer consumed it — so nothing regresses server-side and no migration is needed. udphop stays out of the mask dropdown on purpose: it is client-only in core, which refuses to wrap a server socket, and that form is shared with the inbound editor.
This commit is contained in:
@@ -19,6 +19,8 @@ export const TcpMaskSchema = z.object({
|
||||
});
|
||||
export type TcpMask = z.infer<typeof TcpMaskSchema>;
|
||||
|
||||
// 'udphop' is client-only in xray-core (it refuses to wrap a server socket),
|
||||
// so it round-trips here but is deliberately absent from the mask dropdown.
|
||||
export const UdpMaskTypeSchema = z.enum([
|
||||
'salamander',
|
||||
'mkcp-legacy',
|
||||
@@ -28,6 +30,7 @@ export const UdpMaskTypeSchema = z.enum([
|
||||
'noise',
|
||||
'sudoku',
|
||||
'realm',
|
||||
'udphop',
|
||||
]);
|
||||
export type UdpMaskType = z.infer<typeof UdpMaskTypeSchema>;
|
||||
|
||||
@@ -43,9 +46,9 @@ export type QuicCongestion = z.infer<typeof QuicCongestionSchema>;
|
||||
export const BbrProfileSchema = z.enum(['conservative', 'standard', 'aggressive']);
|
||||
export type BbrProfile = z.infer<typeof BbrProfileSchema>;
|
||||
|
||||
// udpHop randomizes the QUIC port between a range every `interval` seconds
|
||||
// to dodge port-based blocking. Both fields are dash-range strings on the
|
||||
// wire (e.g. '20000-50000', '5-10'). preprocess coerces legacy DB rows
|
||||
// udpHop declares the hop range advertised to clients as `mport`. xray-core
|
||||
// 26.9.9 moved actual hopping to the 'udphop' UDP mask and ignores this key,
|
||||
// which was always inert server-side. preprocess coerces legacy DB rows
|
||||
// where interval was stored as a number (UI bug — see B19 in commit history).
|
||||
const StringRangeSchema = z.preprocess((v) => (typeof v === 'number' ? String(v) : v), z.string());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user