Selenium + Chrome cannot do proxy auth natively — --proxy-server ignores credentials and Chrome pops a login dialog Selenium can't touch. Here are the two reliable patterns.
selenium-wire intercepts traffic in a local MITM layer and handles upstream auth for you:
pip install selenium-wire seleniumfrom seleniumwire import webdriver
options = {
"proxy": {
"http": "http://USER-country-us-session-sel1-lifetime-30:PASS@residentialboson.quantumproxies.io:10000",
"https": "http://USER-country-us-session-sel1-lifetime-30:PASS@residentialboson.quantumproxies.io:10000",
}
}
driver = webdriver.Chrome(seleniumwire_options=options)
driver.get("https://ipinfo.io/json")
print(driver.find_element("tag name", "body").text)
driver.quit()Generate a tiny MV3 extension at runtime that answers the auth challenge via chrome.webRequest.onAuthRequired, and load it with --load-extension. No traffic interception, works with vanilla Selenium. Full generator in selenium_proxy.py.
| selenium-wire | extension shim | |
|---|---|---|
| Setup | one pip install | ~40 lines, no extra deps |
| TLS | re-signed locally (MITM) | untouched |
| Headless | ok | needs --headless=new |
Either way, use a sticky session (-session-…-lifetime-30, port 10000): a browser page load is dozens of requests and they must exit from one IP.
QP_USER=... QP_PASS=... python selenium_proxy.py
IPs supplied by QuantumProxies residential proxies — entry-priced residential pool, geo flags in the username, per-GB billing. Credentials: app.quantumproxies.io.