3x-ui/frontend/src
mrchatam 5ad9df69b9
fix(link): restore mKCP seed and headerType on share-link import (#6480)
* fix(link): restore mKCP seed and headerType on share-link import

applyTransport / applyTransportParams ignored kcp query params that
applyKcpShareParams emits, so re-imported outbounds lost seed and
header and could not talk to the inbound. Mirror those fields (plus
mtu/tti) into kcpSettings in both Go and TS importers.

Fixes #6476

* fix(link): restore mKCP header/seed via finalmask mkcp-legacy

* fix(link): split mKCP header and seed into separate masks on import

Both importers folded a share link's headerType and seed into one
mkcp-legacy mask {header, value}. xray-core's MkcpLegacy.Build ignores
value once header is set (and reads it as the fake DNS domain for
header=dns), so an imported outbound carried the header mask but no
AES-128-GCM seed while the emitting inbound has both, and could not
connect — the failure #6476 reports, now for every link carrying both
params. Emit one mask per field, seed first: the finalmask array's
first item is the innermost layer, which puts the header around the
cipher as legacy mKCP did.

Also bound mtu/tti to KCPConfig.Build's accepted ranges (mtu >= 21,
tti 10..1000, decimal digits only on both importers) so a pasted link
cannot fail the whole Xray config load, and look header types up as
own properties so a prototype key such as "constructor" is not mapped.

---------

Co-authored-by: mrchatam <287639636+mrchatam@users.noreply.github.com>
Co-authored-by: Sanaei <ho3ein.sanaei@gmail.com>
2026-09-13 22:28:13 +02:00
..
api feat(sub): leastLoad member weights for subscription balancers (#6304) 2026-09-02 20:21:27 +02:00
components feat(discord): add Discord notification bot service (#6486) 2026-09-13 14:04:53 +02:00
entries fix(frontend): isolate subscription language preference (#6394) 2026-09-03 16:33:37 +02:00
generated feat(settings): add setting for Reality scan candidates (#6471) 2026-09-13 14:48:28 +02:00
hooks fix(clients): preserve traffic reset schedule when toggling enable (#6502) 2026-09-13 21:27:15 +02:00
i18n fix(frontend): isolate subscription language preference (#6394) 2026-09-03 16:33:37 +02:00
layouts feat(discord): add Discord notification bot service (#6486) 2026-09-13 14:04:53 +02:00
lib fix(link): restore mKCP seed and headerType on share-link import (#6480) 2026-09-13 22:28:13 +02:00
models feat(settings): add setting for Reality scan candidates (#6471) 2026-09-13 14:48:28 +02:00
pages feat(inbounds): show linked host remarks in inbound list (#6468) 2026-09-13 22:03:50 +02:00
schemas feat(geodata): add standard source presets (#6504) 2026-09-13 20:02:43 +02:00
styles Move to TypeScript 7 and the oxc toolchain (oxlint + oxfmt) (#6262) 2026-08-19 15:36:27 +02:00
test fix(link): restore mKCP seed and headerType on share-link import (#6480) 2026-09-13 22:28:13 +02:00
utils fix(frontend): isolate subscription language preference (#6394) 2026-09-03 16:33:37 +02:00
env.d.ts refactor(frontend): replace axios with the native Fetch API 2026-07-08 01:09:18 +02:00
main.tsx chore(deps): migrate to react-router 8 and refresh frontend dependencies 2026-07-25 02:07:15 +02:00
queryClient.ts
routes.tsx Move to TypeScript 7 and the oxc toolchain (oxlint + oxfmt) (#6262) 2026-08-19 15:36:27 +02:00