Chrome cannot authenticate to a SOCKS5 proxy, which is why we run a relay
Username and password in a SOCKS5 proxy URL are ignored by Chromium, silently. The fix is a local forwarding relay, and it solves a second problem too.
5 min readDivyansh Singh
If you buy proxies, sooner or later a vendor hands you a SOCKS5 endpoint with a username and a password. And if you then point Chromium at it in the obvious way, by putting the credentials in the proxy argument, the connection fails in a way that suggests the proxy is broken.
The proxy is fine. Chromium does not implement SOCKS5 username and password authentication at all. It is a long-standing gap in Chromium's network stack, not a configuration mistake, and the reason it is so expensive is that the failure looks like somebody else's fault.
What actually happens
The SOCKS5 protocol negotiates an authentication method before it does anything else. The client offers a list, the server picks one, and username-and-password is method 0x02. Chromium does not offer it. It opens the connection offering no method the server accepts, the server closes it, and what surfaces in the browser is a generic proxy connection failure with no mention of authentication anywhere.
From the operator's chair, three plausible explanations all fit the evidence: the proxy is down, the credentials are wrong, or the subscription lapsed. The actual explanation - that the browser was never able to send them - is the only one that never comes to mind, because software that quietly ignores the credentials you gave it is not the first hypothesis anybody reaches for.
This is a limitation and not a bug report. It has been the state of Chromium's network stack for years, it is the same on every Chromium-derived build, and no flag turns it on.
This is also why the workaround is so widely circulated and so bad: HTTP proxies do support credentials in the argument, so a lot of advice quietly switches you to HTTP. That works, and it puts a password on a command line.
Why a password on a command line is its own problem
On Windows, a process's command line is readable by other processes on the machine. It appears in process listings, in crash telemetry, in logs that capture how a program was started, and in any diagnostic that dumps the environment.
So the HTTP workaround trades a protocol limitation for a credential exposure, and it does it in a way that never announces itself either. The password works. Everything functions. The exposure is invisible until somebody looks at a process listing.
Ward passes no credentials to any browser it launches, on any protocol. That is not a policy applied by discipline; it is structural, because of what sits in between.
The relay
Ward starts a small forwarding proxy on 127.0.0.1 for each running profile, on an ephemeral port, and points the browser at that. The relay holds the upstream credentials and speaks whichever protocol the upstream actually wants - HTTP, HTTPS, SOCKS4, SOCKS4a or SOCKS5, with authentication where the upstream requires it.
The browser sees a local, unauthenticated proxy. The credentials never appear on a command line, never enter the browser process, and are never written anywhere a page could reach.
That solves the protocol problem and the exposure problem with one component, and it buys three further things that were not the original motivation:
- A place to probe from. Before a profile launches, the relay dials the upstream and reads back the address the traffic exits from. If that fails, the launch refuses. The failure it prevents is a window that quietly browses from the operator's own address while the profile list says it is exiting from another country - the worst thing this product could do, and completely invisible from inside the application.
- A place to derive the timezone from. The exit address is what the profile's timezone is generated against, so a profile cannot report a timezone that contradicts the address it is arriving from.
- A lifetime that matches the browser's. One relay per running profile, dying with it. Shutdown order is fixed in one place: the automation API first, then the browsers, then the relays, then the database.
What this costs
An extra hop on loopback, which is not measurable against the round trip to a residential exit node in another country. One more process-local listener per running profile. And a component that has to be correct, because everything a profile does goes through it.
That last one is the real cost, and it is why the relay is the part of this codebase with the least clever code in it.
And one thing this post is not claiming. The relay's refusal behaviour is proven: point a profile at a dead port and the launch is refused, and eleven different ways of breaking an upstream have been shown not to produce a fallback to a direct connection. A successful exit through a paid, credentialed endpoint has not been run on the machine this was written on - that needs a subscription this project does not have yet. The protocol limitation above is why the relay exists; it is not a report of a session that went through one.
If you are evaluating any tool in this category
Ask what the browser is pointed at. There are only two honest answers: a local relay, or the upstream proxy directly. If it is the upstream directly and the upstream needs credentials, then either they are on a command line where other processes can read them, or the tool is using HTTP where you asked for SOCKS5, or it is doing something it has not told you about.
And ask what happens when the proxy does not answer. A tool that opens the browser anyway has decided, on your behalf, that a session from your own address is better than no session. It is not, and you should be the one making that call.
How this post was checked
- Data source
- Chromium's long-standing absence of SOCKS5 username and password authentication, which is the documented reason Ward ships a local forwarding relay rather than pointing the browser at an upstream
- Measured with
- Ward's proxy relay and its five upstream dialers, and the fail-closed launch tests that point a profile at a dead loopback port through the real prober
- The claim
- A browser that cannot authenticate to a proxy at all, and does not say so, forces every tool in this category into either a relay or a credential on a command line.
Divyansh Singh
Builds Ward at Digital Heroes
Divyansh Singh builds Ward, a Windows manager for many isolated browser profiles, at Digital Heroes. Most of his week is spent in the Chromium command line, the DevTools Protocol and Windows process behaviour. Every measurement quoted in these posts was taken on the machine Ward is built and tested on, with the browser or tool version written down beside the result, and the ones that contradicted what the documentation said are the ones that became posts.
Last reviewed . Corrections and bug reports: support@digitalheroes.co.in.
Ward is the desktop application these measurements came out of
Many browser profiles on one PC, each with its own proxy and its own device identity. Free plan, free account, nothing to buy today.