Skip to content

feat(proxy): take proxy credentials exactly as written - #26

Merged
cvl merged 3 commits into
mainfrom
feat/literal-proxy-credentials
Oct 22, 2026
Merged

cvl merged 3 commits into
mainfrom
feat/literal-proxy-credentials

Conversation

@cvl

@cvl cvl commented Oct 22, 2026

Copy link
Copy Markdown
Contributor
  • test(proxy): keep the URL parser tests next to the parser
  • docs: proxy credentials are taken as written; 0.2.1 changelog entry
  • feat(proxy): take proxy credentials exactly as written

cvl added 3 commits October 22, 2026 19:08
The username and password in a proxy URL are no longer passed through
net/url: the text before the last @ is the credentials, split once at the
first colon, and sent byte for byte over Basic and SOCKS5 authentication.
Entries saved by earlier versions keep their percent-encoded form and are
decoded; new entries carry a literal marker. The redactor splits the same
way and validates the host part, so no password byte can appear in output.

When a proxy rejects the login or the shell splits an unquoted URL, the
error says what to do: quote the URL, or write the real characters instead
of a percent-encoded password. SOCKS5's 255-byte credential limit is
checked when the URL is parsed, not only when connecting.

Signed-off-by: Vitas Civilis <vytautas@civilis.lt>
Signed-off-by: Vitas Civilis <vytautas@civilis.lt>
Signed-off-by: Vitas Civilis <vytautas@civilis.lt>
@cvl
cvl requested a review from a team as a code owner October 22, 2026 16:22
@cvl
cvl merged commit 41e9726 into main Oct 22, 2026
4 checks passed
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