Replies: 1 comment
-
|
Hello! It's already possible: SeleniumBase lets you spin up a local proxy server with SOCKS5 & auth in one console/terminal window, and then you can connect to it without auth in a separate console/terminal window. Instructions for that: Open two windows.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem
SeleniumBase already handles authenticated HTTP/HTTPS proxies really well (the runtime
chrome-proxyextension built inproxy_helper.create_proxy_ext). But authenticated SOCKS5/SOCKS4 proxies can't work in Chrome/Edge at all:--proxy-server, andwebRequest.onAuthRequirednever fires for SOCKS, so the extension approach doesn't help either.So today
Driver(proxy="socks5://user:pass@host:1080")fails withERR_NO_SUPPORTED_PROXIES/ERR_EMPTY_RESPONSE. This comes up fairly often (e.g. #3832 and various discussions), because a lot of residential/mobile providers only hand out authenticated SOCKS5 endpoints.Proposal
When the configured proxy is an authenticated SOCKS proxy, SeleniumBase could transparently start a tiny local, no-auth HTTP relay that forwards through the upstream SOCKS proxy, and point the browser at
127.0.0.1:<port>(cleaning it up ondriver.quit()). Everything else — including the existing HTTP-auth extension path and IP-authenticated SOCKS — stays exactly the same.The relay is ~150 lines of standard-library
asyncio(no new dependencies). I've already built and battle-tested this as a small standalone MIT library, and I'd be happy to contribute a trimmed, SOCKS-only version:https://github.com/SAKMZ/selenium-proxy-tools
Rough wire-in:
On Windows the relay uses
SelectorEventLoopso shutdown stays clean, and it does remote DNS (no DNS leaks).A few questions before I open a PR
proxy_helper.py, or add a newproxy_relay.py?Happy to open a PR along these lines (with a local SOCKS5-auth test, no network needed) if it's of interest. Thanks for SeleniumBase! 🙌
Beta Was this translation helpful? Give feedback.
All reactions