3x-ui/internal/util/link
BlindMaster24 f3dba07e13
fix(link): read the vmess certificate checks on import (#6507)
* fix(link): read the vmess certificate checks on import

applyVmessTLSParams writes ech, vcn and pcs into the vmess share object, but
parseVmess only read sni, fp and alpn back. Importing a link the panel had just
exported therefore dropped all three: no pinned certificate, no verify-by-name,
no ECH. On a server whose certificate is only trusted through a pin, the
imported outbound falls back to public-CA verification against the system roots
and cannot connect to the inbound the link came from.

The url-param protocols already read the same three in applySecurity, and the
core takes pinnedPeerCertSha256 as one joined string there, so the vmess path
now fills them the same way.

* fix(frontend): read the vmess certificate checks on import

The panel parses share links twice: link.ParseLink in Go and
parseVmessLink in outbound-link-parser.ts, which is what the Add Outbound
button calls. Reading ech, vcn and pcs in Go alone would have made the two
sides disagree on one link, leaving the UI path — the one an operator uses by
hand — still dropping the pin the panel had just exported.
2026-09-13 19:58:10 +02:00
..
outbound.go fix(link): read the vmess certificate checks on import (#6507) 2026-09-13 19:58:10 +02:00
outbound_fuzz_test.go Test-quality audit: fix 2 prod bugs, strengthen weak tests, add mutation/fuzz/CI tooling (#5345) 2026-06-15 15:17:03 +02:00
outbound_helpers_test.go fix(link): map vcn to verifyPeerCertByName in applySecurity (#6479) 2026-09-12 11:04:10 +02:00
outbound_test.go fix(link): preserve Shadowsocks TLS query params on import (#6467) 2026-09-12 11:52:38 +02:00