Originally published on proxymint.
Chrome sends no SOCKS5 login. What an extension, a local forwarder, Playwright, Puppeteer and PAC files do with one, from a dated loopback test.
TL;DR
- Don't spend time on Chrome flags or settings, because the login is never sent. Chrome's SOCKS5 greeting is hard-coded to one method, no authentication. A server that wants a login answers 0xFF. Gerrit change 5952488, the fix that would add it, has sat unmerged since October 2024.
- An extension won't fix it, even one written for proxy auth. In the test, onAuthRequired never fired for a SOCKS5 proxy and the page failed with net::ERR_SOCKS_CONNECTION_FAILED. The same extension logged in to an HTTP proxy on the first try.
- If it has to be SOCKS5, put a forwarder on 127.0.0.1. pproxy took Chrome's no-login connection and logged in upstream, and the upstream logged the RFC 1929 login as OK. Check the bind, though. With an empty host it listened on every interface.
- Keep credentials out of PAC files. A SOCKS5 entry with user:pass@ in it didn't error. Chrome skipped it and loaded the page directly, with the proxy never contacted.
Key takeaways
- Use the HTTP endpoint for browser jobs that need a login. Playwright's username and password fields and Puppeteer's page.authenticate() both worked against an HTTP proxy, and both failed against SOCKS5.
- Pin Python 3.13 for pproxy. It is an easy hour to lose. Version 2.7.9 crashed on Python 3.14.6 with "There is no current event loop in thread 'MainThread'", and the same version ran fine on 3.13.14.
- Use Chrome for Testing if you inject an extension. Branded Chrome 157 printed "--load-extension is not allowed in Google Chrome, ignoring." since the flag left branded builds in Chrome 137.
- Run lsof after you start any forwarder. You want 127.0.0.1:PORT in the LISTEN line. A *:PORT line means anyone who can reach the port is using your login.
Read the full guide on proxymint, with the commands, tables and sources.
Top comments (0)