The Selenium proxy challenge
Selenium drives real browsers, which is great for realism and testing. Its one awkward area is authenticated proxies. Chrome's --proxy-server flag doesn't accept a username and password, and browsers show a native login dialog for proxy authentication that classic Selenium can't fill in. There are three reliable ways around it with Geonode:
- IP whitelisting: authorise your machine's IP in the Geonode dashboard, so no credentials are needed.
- A local forwarding proxy: a small proxy on your machine adds credentials and forwards to Geonode.
- Browser-specific mechanisms: such as newer Selenium network features or extensions, which vary by version.
For most teams, whitelisting (on servers with fixed IPs) or a local forwarder (everywhere else) is the most dependable. See proxy authentication methods.
Option 1: IP whitelisting with Chrome
If your server has a fixed public IP, add it to Geonode's whitelist, then pass only the host and port:
import os
from selenium import webdriver
opts = webdriver.ChromeOptions()
opts.add_argument(f"--proxy-server=http://{os.environ['GEONODE_HOST']}:{os.environ['GEONODE_PORT']}")
opts.add_argument("--force-webrtc-ip-handling-policy=disable_non_proxied_udp")
driver = webdriver.Chrome(options=opts)
driver.get("https://api.ipify.org")
print(driver.find_element("tag name", "body").text)
driver.quit()With whitelisting, location targeting is usually chosen in the dashboard or by port rather than in the username. Check the options your dashboard offers for whitelisted access.

Option 2: a local forwarding proxy
Run a tiny forwarder that listens locally without authentication and forwards to Geonode with your credentials. Tools such as proxy-chain (Node.js) or a minimal configuration of a local proxy server do this. Then point Selenium at the local address:
opts.add_argument("--proxy-server=http://127.0.0.1:8000")The forwarder holds the Geonode username (including any targeting suffix, such as -country-us in the pattern Geonode documents) and password. Run one forwarder per identity if you need different locations or sessions in parallel.
Firefox
Firefox reads proxy settings from preferences:
from selenium import webdriver
opts = webdriver.FirefoxOptions()
host, port = os.environ["GEONODE_HOST"], int(os.environ["GEONODE_PORT"])
opts.set_preference("network.proxy.type", 1)
opts.set_preference("network.proxy.http", host)
opts.set_preference("network.proxy.http_port", port)
opts.set_preference("network.proxy.ssl", host)
opts.set_preference("network.proxy.ssl_port", port)
opts.set_preference("media.peerconnection.enabled", False) # disable WebRTC
driver = webdriver.Firefox(options=opts)Authentication still needs whitelisting or a forwarder in most setups.
Proxy tip: Before scaling, run a short pilot on your real targets with Geonode and record success rate, latency and GB per result. Our our complete Geonode guide explains which Geonode product to start with.
Newer Selenium features
Recent Selenium releases have added WebDriver BiDi support, including network features that can respond to authentication challenges in some browsers and language bindings. If you're on a recent version, check the official documentation for your language; it may let you authenticate without a forwarder. Pin your Selenium version and re-test proxy authentication after upgrades.
Sessions and location
- Rotating: start a new driver (or a new forwarder session) per job for a fresh exit.
- Sticky: use a sticky endpoint in the forwarder for flows that need one IP.
- Match the browser to the exit: set language with
--lang(Chrome) orintl.accept_languages(Firefox), and timezone through the environment or browser options where supported.
Testing
After setup, load an IP check page and confirm the IP and country, then a WebRTC leak test. Keep that check as the first step of every test run.
Troubleshooting
| Problem | Likely cause | Fix |
|---|---|---|
| Proxy login dialog appears | Authenticated proxy without whitelisting or forwarder | Whitelist your IP or use a forwarder |
| Exit shows your server's IP | Proxy flag missing or bypassed | Check options; confirm on an IP page |
| 407 from forwarder | Wrong credentials in forwarder config | Copy from Geonode dashboard |
| Real IP visible in WebRTC test | WebRTC not restricted | Add the WebRTC flag or preference |
Budget tip: For jobs where a fixed IP list is enough, Webshare is one of the cheapest options: shared datacenter proxies are sold by the IP, and static residential (ISP) proxies cost well under a dollar per IP per month at the time of writing. More in using Webshare with Selenium.
Selenium in testing pipelines with Geonode
Selenium is most often used for testing, and proxies make geo-testing possible. A practical pipeline:
- One forwarder per market, each configured with a Geonode username targeted to that country, listening on its own local port.
- A test matrix that maps each market to its forwarder port, locale and expected content (currency, language, legal text).
- A smoke step that opens an IP check page through each forwarder and asserts the expected country before any tests run.
- Screenshots on failure, named by market, attached to the test report.
- Credentials in CI secrets, injected into the forwarders at startup, never committed.
If you use Selenium Grid, run forwarders alongside the nodes and pass the right local address in each session's capabilities. Keep the forwarders' credentials and targeting in one configuration file so adding a market is a one-line change.
When to consider alternatives
Selenium remains a solid choice when you need its language bindings, its browser coverage or an existing test suite. If authenticated per-context proxies are central to your work and you're starting fresh, Playwright's built-in proxy credentials remove the need for forwarders. If you only need page content rather than browser behaviour, an HTTP client or the Geonode Scraper API is simpler and cheaper. For geo QA practice in general, see Geonode for localization testing.
Residential tip: If you want to try this on an ethically sourced residential pool, Rayobyte offers a free trial with no credit card, then pay-as-you-go traffic from $3.50 per GB that drops to $0.70 per GB at 1 TB. See using Rayobyte with Selenium.
Starting small
Begin with one market and one forwarder, prove the smoke test and a single geo check in CI, then add markets one at a time.
Strict sites usually need residential proxies. To compare Geonode with other providers for Selenium work, see our guide to the best proxies in 2026.
Comparing two popular self-serve providers? Webshare vs Geonode for Selenium breaks down which fits this job and when it makes sense to use both.
Considering Rayobyte instead of, or alongside, Geonode for this? Rayobyte vs Geonode for Selenium compares the two, and Using Rayobyte Proxies With Selenium covers the Rayobyte setup.
FAQ
Can I put Geonode credentials in Chrome's proxy flag?
No. Chrome ignores credentials there. Use whitelisting or a local forwarder.
Is Selenium Wire still a good option?
It was popular for authenticated proxies but is no longer actively maintained. Prefer whitelisting, a forwarder, or newer built-in features.
How do I use different countries in parallel?
Run one forwarder per country (or session), each with its own targeted Geonode username, and point each driver at its forwarder.
Should I switch to Playwright?
If authenticated proxies per context matter a lot, Playwright handles them natively. See Geonode with Playwright.
Sources and further reading
Independent references that back up the points above, from standards bodies, governments, universities and non-profits. They open in a new tab.
- RFC 7617: The Basic HTTP Authentication Scheme (IETF / RFC Editor): The scheme most proxy providers use for username and password authentication.
- Glossary: Proxy Server (NIST CSRC): NIST's formal definition of a proxy server.
- SP 800-63B: Authentication and Authenticator Management (NIST): NIST's guidance on passwords and authentication, relevant to proxy credentials and accounts.
- RFC 1929: Username/Password Authentication for SOCKS V5 (IETF / RFC Editor): How SOCKS5 proxies check a username and password.
- Selenium documentation (Selenium project): Official Selenium documentation, including proxy configuration.
Editorial note: Proxy providers change their pools, features and prices often, so treat any figures here as typical ranges at the time of writing and confirm current terms with the provider before you buy.