Skip to content

Support plain userinfo in ss URLs#3251

Open
TurboTheTurtle wants to merge 1 commit into
shadowsocks:masterfrom
TurboTheTurtle:fix-ss-url-2022-import
Open

Support plain userinfo in ss URLs#3251
TurboTheTurtle wants to merge 1 commit into
shadowsocks:masterfrom
TurboTheTurtle:fix-ss-url-2022-import

Conversation

@TurboTheTurtle
Copy link
Copy Markdown

Summary:

  • Accept plaintext percent-encoded userinfo in ss:// URLs.
  • Keep the existing base64 userinfo path for backward compatibility.
  • Add coverage for an AEAD 2022 URL containing a percent-encoded base64 key.

Why:
ssurl can emit ss://method:password@host:port links where the userinfo is percent-encoded rather than base64-wrapped. The Android importer only tried base64-decoding that userinfo, so valid AEAD 2022 links failed to import.

Closes #3135.

Validation:

  • git diff --check
  • JAVA_HOME=/opt/homebrew/opt/openjdk@21 ANDROID_HOME=/Users/andy/Library/Android/sdk ./gradlew :core:compileDebugKotlin
  • JAVA_HOME=/opt/homebrew/opt/openjdk@21 ANDROID_HOME=/Users/andy/Library/Android/sdk ./gradlew :core:connectedDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.github.shadowsocks.database.ProfileTest

Please preserve author attribution if this PR is squashed or reworked:
Co-authored-by: Andy Ye 35905412+TurboTheTurtle@users.noreply.github.com

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.

Failed to import ss:// (ssurl bug or Android app bug?)

1 participant