3x-ui/sub
MHSanaei 3c5e9fa774
fix(sub): preserve userinfo encoding in trojan/shadowsocks/hysteria links
The link builders ran the assembled share link through url.Parse +
parsedURL.String(), which decodes the userinfo and re-emits it via
Go's lenient encoder — sub-delim chars (=, +, ;) are left literal even
when the caller had pre-encoded them via encodeUserinfo. Result: copy
URL from the panel UI worked (FE never round-trips), but the same
inbound in the subscription body became "trojan://abc%2Fdef=ghi+@..."
and was rejected by Trojan/Hysteria clients.

Replace url.Parse + .String() with a direct string-builder that
appends ?query and #fragment without touching the userinfo, and apply
it to genHysteriaLink's inline copies too. Also switch the
shadowsocks userinfo from base64.StdEncoding (with =/+/ /padding) to
base64.RawURLEncoding to match the frontend's Base64.encode(s, true).
2026-05-27 10:51:41 +02:00
..
default.json dokodemo-door, socks renamed to mixed, tunnel 2025-09-09 13:57:40 +02:00
dist.go feat(inbounds): add sub/client link endpoints; hide panel version on login 2026-05-11 15:03:47 +02:00
links.go feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
links_test.go Feat/multi inbound clients (#4469) 2026-05-19 12:20:24 +02:00
sub.go feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
subClashService.go feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
subClashService_test.go fix: address open bug reports (#4539, #4538, #4535, #4531, #4515) (#4545) 2026-05-25 00:08:06 +02:00
subController.go feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
subJsonService.go feat: complete Zod migration of frontend + bulk client batching (#4599) 2026-05-27 04:26:50 +02:00
subService.go fix(sub): preserve userinfo encoding in trojan/shadowsocks/hysteria links 2026-05-27 10:51:41 +02:00
subService_test.go fix: address open bug reports (#4539, #4538, #4535, #4531, #4515) (#4545) 2026-05-25 00:08:06 +02:00