mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-25 13:56:10 +00:00
fix(sub): SS2022 share links must not base64-encode userinfo (#5432)
Per SIP022, ss:// links for 2022-blake3-* methods must NOT base64-encode the userinfo; method and password are percent-encoded instead. Clients like Hiddify reject the base64 form. Fix both the server-side subscription path and the client-side panel link, plus the matching parsers for round-trip import.
This commit is contained in:
@@ -344,7 +344,12 @@ func parseShadowsocks(link string) (*ParseResult, error) {
|
||||
hp := core[at+1:]
|
||||
userInfo, err := base64DecodeFlexible(userB64)
|
||||
if err != nil {
|
||||
userInfo = userB64 // not b64, rare
|
||||
// SIP022 (2022-blake3-*) userinfo is percent-encoded, not base64.
|
||||
if dec, uerr := url.QueryUnescape(userB64); uerr == nil {
|
||||
userInfo = dec
|
||||
} else {
|
||||
userInfo = userB64 // not b64, rare
|
||||
}
|
||||
}
|
||||
colon := strings.LastIndex(hp, ":")
|
||||
if colon < 0 {
|
||||
|
||||
Reference in New Issue
Block a user