Home/Docs/Selenium
Integration guide 150+ countries 99.9% uptime

How to Use ProxyOmega Proxies with Selenium

Selenium remains the most portable browser-automation framework — same WebDriver API in Python, Java, JavaScript, Ruby and C#. Authenticated proxies are the historical pain point, because raw Chrome ignores user:pass in command-line flags. The patterns below handle that.

Quick start

Use the Premium Unlimited endpoint below — it accepts the username-modifier syntax used throughout this guide. Other plans use the same code shape with a different host and port (see the endpoint table at the bottom).

Quick start (Python + selenium-wire)python
# pip install selenium selenium-wire
from seleniumwire import webdriver

options = {
    'proxy': {
        'http':  'http://<USERNAME>:<PASSWORD>@premium.proxyomega.com:8000',
        'https': 'http://<USERNAME>:<PASSWORD>@premium.proxyomega.com:8000',
        'no_proxy': 'localhost,127.0.0.1'
    }
}

driver = webdriver.Chrome(seleniumwire_options=options)
driver.get('https://api.ipify.org')
print(driver.page_source)
driver.quit()

Rotation: sticky session vs rotating

Append -session-<id>-ttl-<seconds> to your username to hold the same exit IP. Drop the suffix entirely for a fresh IP on every request.

Sticky session vs rotatingpython
# Rotating — new IP per browser launch
rotating = 'http://<USERNAME>:<PASSWORD>@premium.proxyomega.com:8000'

# Sticky — same IP for 600s
sticky = 'http://<USERNAME>-session-checkout-ttl-600:<PASSWORD>@premium.proxyomega.com:8000'

opts = {'proxy': {'http': sticky, 'https': sticky}}
driver = webdriver.Chrome(seleniumwire_options=opts)

Country targeting

Add -country-XX (ISO 3166 alpha-2) to your username. State and city modifiers are supported on Premium Unlimited, Platinum and Mobile.

Country targeting (Java)java
// Selenium 4, Java — using a Proxy object (IP whitelist or non-auth)
import org.openqa.selenium.Proxy;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;

Proxy proxy = new Proxy();
proxy.setHttpProxy("premium.proxyomega.com:8000");
proxy.setSslProxy("premium.proxyomega.com:8000");

ChromeOptions opts = new ChromeOptions();
opts.setProxy(proxy);
// For per-request auth via username modifier, pair with a CDP override
// or selenium-wire on Python. With IP whitelisting, no auth is needed.

WebDriver driver = new ChromeDriver(opts);
driver.get("https://api.ipify.org");

Authentication: username/password vs IP whitelist

Two ways to authenticate. Username/password is set on every request and is what every example in this guide uses. IP whitelist is configured in the ProxyOmega dashboard — once your runner IP is listed, drop the credentials from the proxy URL and the connection is authorised by source IP.

Chrome and Firefox launched directly by Selenium do not handle proxy username/password. The two robust options are: (1) use selenium-wire in Python, or (2) whitelist the runner IP in the ProxyOmega dashboard and drop credentials entirely.

Common errors and fixes

HTTP 407 Proxy Authentication Required

Wrong username or password, or the credentials contain a special character that was not URL-encoded. Re-copy from the dashboard.

Connection refused / connection reset

Either the runner IP is not on your whitelist (if you use IP auth) or your network blocks outbound on the proxy port. Test with curl first.

Read timeout / no response

Residential exits sometimes have tail latency. Raise client timeout to 30–60 s and enable retry. If timeouts persist across many sessions, the target is rate-limiting your country — switch country.

Always the same IP returned

You have a -session- suffix in your username, or HTTP keep-alive is reusing the connection. Drop the session suffix and disable keep-alive on the client to force new exits.

Recommended plan

Premium Unlimited Residential
Username-modifier syntax means you can switch country between WebDriver sessions without changing host config.
View plan

All endpoints

PlanHostPortNotes
Budget Unlimitedresidential.proxyomega.com10000–10099Per-port country / rotation set in the dashboard. No username suffixes.
Premium Unlimitedpremium.proxyomega.com8000Username modifiers: -country-XX, -session-{id}-ttl-{seconds}.
Platinumplatinum.proxyomega.com20228ASN / state / city targeting via username modifiers.
Mobilemobile.proxyomega.com20229Real 4G/5G carrier IPs. Same username modifier syntax.
IPv6ipv6.proxyomega.com9000IPv6 exits, supports UDP_ASSOCIATE.

FAQ

Why does Chrome ignore --proxy-auth?

There is no such flag in modern Chrome. Either use selenium-wire (intercepts CONNECT and injects Proxy-Authorization), build a tiny MV3 extension that calls chrome.webRequest.onAuthRequired, or whitelist the host IP.

Does Firefox handle proxy auth natively?

Firefox prompts a dialog. You can pre-set network.automatic-ntlm-auth.trusted-uris or, simpler, also use selenium-wire on Python / a profile preferences object that stores creds.

Can I rotate IP per WebDriver instance?

Yes — start a new driver per identity, each with a different -session-<id> in the username. Drivers are heavy, so prefer Playwright for large parallel runs.

What about Selenium Grid?

Set the proxy in capabilities on each node. selenium-wire works through Grid in standalone mode but not in distributed mode — for distributed, prefer IP whitelisting per node.

Related guides

Ready to use ProxyOmega with Selenium?
Sign up in under a minute. Pay-as-you-go and unlimited plans available.