How to use proxies with Selenium
Selenium routes traffic through a proxy via browser options — a --proxy-server argument for Chrome or a configured Proxy object. Chrome ignores credentials in that flag, so authenticated proxies need a local forwarder that adds the credentials.
Setup
Set up Selenium in 5 steps
- 01
Install Selenium
Install the bindings; recent versions manage the driver binary for you.
pip install selenium - 02
Start a local forwarder
Chrome ignores credentials in --proxy-server and shows a native dialog Selenium cannot dismiss. Run a small local forwarder on 127.0.0.1 that adds your username and password upstream. Replace PROXY_HOST, PROXY_PORT, USERNAME and PASSWORD with the endpoint and credentials shown in your seamless dashboard.
# Local relay without auth, forwarding upstream with your credentials gost -L http://127.0.0.1:8080 -F http://USERNAME:PASSWORD@PROXY_HOST:PROXY_PORT - 03
Point Chrome at the forwarder
Chrome now talks to localhost without credentials and the forwarder handles authentication. The full walkthrough, including a DevTools alternative, is in our Selenium proxy authentication guide.
from selenium import webdriver options = webdriver.ChromeOptions() options.add_argument("--proxy-server=http://127.0.0.1:8080") driver = webdriver.Chrome(options=options) driver.get("https://example.com") - 04
Or use Firefox
Firefox takes its proxy from preferences on the options object. It cannot accept credentials this way either, so point it at the same local forwarder.
from selenium import webdriver options = webdriver.FirefoxOptions() options.set_preference("network.proxy.type", 1) options.set_preference("network.proxy.http", "127.0.0.1") options.set_preference("network.proxy.http_port", 8080) options.set_preference("network.proxy.ssl", "127.0.0.1") options.set_preference("network.proxy.ssl_port", 8080) driver = webdriver.Firefox(options=options) - 05
Verify the exit IP
Confirm the browser is really going through the proxy before you build anything on top of it.
driver.get("https://api.ipify.org?format=json") print(driver.page_source)
Guides
Before you scale this up
Guides · 13 min read
How to Avoid Getting Blocked When Web Scraping
The six layers a modern anti-bot system checks, in the order it checks them — and what to change at each one to stay unblocked.
Read the guideGuides · 13 min read
How to Choose the Best Proxies for Web Scraping
Which proxy type to use, how to size your pool, how rotation and geo-targeting work, and the response-quality checks that catch silent failures.
Read the guideGuides · 11 min read
How to Scrape Google Search Results
Which proxies survive Google, the search parameters that control localisation, how to read CAPTCHAs as a rate signal, and a working Python example.
Read the guide
FAQ
Questions about Selenium proxies
Anything else? Our team answers on live chat, by email and on Discord.
How do I use an authenticated proxy in Selenium with Chrome?
Chrome ignores credentials placed in the --proxy-server flag and raises a native authentication dialog that WebDriver cannot interact with. The reliable approach is a local forwarder on 127.0.0.1 that adds the credentials upstream, so the browser itself connects without any. The old extension trick no longer loads in recent branded Chrome builds.
Does Selenium support SOCKS5 proxies?
Yes. Chrome accepts --proxy-server=socks5://host:port, and Firefox can be pointed at a SOCKS proxy through the network.proxy.socks preferences.
Should I use Selenium or Playwright with proxies?
Playwright handles proxy authentication natively and supports a different proxy per browser context, which makes it markedly less awkward for proxy work. Selenium remains the pragmatic choice when you already have an established suite built on it.

Start small. Scale when it works.
Buy a little bandwidth or rent a single ISP proxy for a day, test it on your own targets, then grow from there.
