Does it Support socks5://IP_ADDRESS:PORT@USER:PASS"? #3118
-
Does it Support socks5://IP_ADDRESS:PORT@USER:PASS"? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Chromium doesn't support SOCKS5 authenticated proxies (https://issues.chromium.org/issues/40829748). For socks4 or socks5 proxies, use these formats for the proxy_string: Unauthenticated:
Authenticated:
If you're using Wire Mode (which DOES NOT support UC Mode), there's a possible workaround: from seleniumbase import Driver
def set_proxy():
driver.proxy = {
"http": "socks5://user:pass@ip:port",
"https": "socks5://user:pass@ip:port",
"no_proxy": "localhost,127.0.0.1",
}
driver = Driver(wire=True)
try:
set_proxy()
driver.get("https://ipinfo.io/")
driver.sleep(5)
finally:
driver.quit() That works because (Again, Wire Mode does not support UC Mode. Use |
Beta Was this translation helpful? Give feedback.
-
hi, i tried this way as the codes(examples/cdp_mode/raw_proxy.py) below, but return error by both proxy format, so what should i do? thanks.
and the error messages are :
|
Beta Was this translation helpful? Give feedback.
-
the local proxy proxy='socks5://127.0.0.1:10080' is what i created to work around the socks5 with authentication. it works fine with selenium chrome with codes as below, opts.add_argument(f"--proxy-server={proxy}") |
Beta Was this translation helpful? Give feedback.
Chromium doesn't support SOCKS5 authenticated proxies (https://issues.chromium.org/issues/40829748).
For socks4 or socks5 proxies, use these formats for the proxy_string:
Unauthenticated:
socks4://IP_ADDRESS:PORT
socks5://IP_ADDRESS:PORT
Authenticated:
socks4://USER:PASS@IP_ADDRESS:PORT
If you're using Wire Mode (which DOES NOT support UC Mode), there's a possible workaround: