Skip to content

Fix SS_PASSWORD environment variable being overwritten by parseURL#260

Open
MOON-CLJ wants to merge 1 commit into
shadowsocks:masterfrom
MOON-CLJ:fix-ss-password-env-var
Open

Fix SS_PASSWORD environment variable being overwritten by parseURL#260
MOON-CLJ wants to merge 1 commit into
shadowsocks:masterfrom
MOON-CLJ:fix-ss-password-env-var

Conversation

@MOON-CLJ

@MOON-CLJ MOON-CLJ commented Mar 4, 2026

Copy link
Copy Markdown

The SS_PASSWORD environment variable was not working because parseURL() always overwrote the password variable, even when the URL contained no password. This caused the environment variable value to be lost.

Changes:

  • Parse URL cipher and password into separate variables
  • Only override flag/env values when URL explicitly provides them
  • Apply fix to both client and server modes

This allows proper priority: URL password > -password flag > SS_PASSWORD env var

Fixes #249

The SS_PASSWORD environment variable was not working because parseURL()
always overwrote the password variable, even when the URL contained no
password. This caused the environment variable value to be lost.

Changes:
- Parse URL cipher and password into separate variables
- Only override flag/env values when URL explicitly provides them
- Apply fix to both client and server modes

This allows proper priority: URL password > -password flag > SS_PASSWORD env var

Fixes shadowsocks#249
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