Skip to content

fix(parser): correctly parse SS2022 (SIP022) userinfo and retain Base64URL compatibility#50

Open
slackworker wants to merge 1 commit into
MetaCubeX:masterfrom
slackworker:fix/ss2022-standard-uri
Open

fix(parser): correctly parse SS2022 (SIP022) userinfo and retain Base64URL compatibility#50
slackworker wants to merge 1 commit into
MetaCubeX:masterfrom
slackworker:fix/ss2022-standard-uri

Conversation

@slackworker

Copy link
Copy Markdown

This PR fixes an SS URI parsing bug where SS2022/SIP022 links with standard percent-encoded userinfo (method:password) were not parsed correctly. The parser previously assumed Base64URL-encoded userinfo and missed the SIP022-required case. The fix adds a robust userinfo parser that tries percent-decoding first and falls back to Base64URL decoding, so both new-standard and legacy links are supported.

References
Shadowsocks SIP002

Quoted note: “But for AEAD-2022 (SIP022), userinfo MUST NOT be encoded with Base64URL. When userinfo is not encoded, method and password MUST be percent encoded.”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant