Selenium

How to Use SocksNode Residential Proxies with Selenium

Quick answer

To use SocksNode residential proxies with Selenium, route the browser through global.socksnode.com:9000 with your generated username and password. Because Chrome and Firefox do not prompt for proxy credentials cleanly, the simplest approach is selenium-wire, which injects the username token and password for you and supports geo and sticky targeting.

Before you start

SocksNode provides residential proxies across 195+ countries over HTTP, HTTPS, and SOCKS5 with username/password auth. Generate credentials for free in the dashboard proxy generator; only routed traffic consumes your prepaid bandwidth (from 5 GB for $4.50, non-expiring on flexible plans).

Vanilla Selenium struggles with authenticated proxies, so selenium-wire is the recommended path for passing credentials without a manual login popup.

Python 3.9+ with selenium and selenium-wire installed
A matching browser driver (ChromeDriver or GeckoDriver)
A SocksNode account with prepaid bandwidth
A username/password from /dashboard/generator
Your target country token

Configure the proxy in Selenium

With selenium-wire, pass the full proxy URL in the options:

The username USERNAME-country-us requests a rotating US residential IP; change the country token to move exits, or add state, city, or ASN tokens for precision.

from seleniumwire import webdriver

options = {
    'proxy': {
        'http': 'http://USERNAME-country-us:PASSWORD@global.socksnode.com:9000',
        'https': 'http://USERNAME-country-us:PASSWORD@global.socksnode.com:9000',
    }
}

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

Rotating vs sticky sessions

Rotating sessions rotate the IP on every request via HTTP port 9000, which fits parallel test runs and broad crawling.

Sticky sessions hold one IP from 1 minute up to 24 hours via HTTP port 10000. Add a token such as USERNAME-country-us-session-run7-lifetime-45 to keep the same IP for a 45-minute session, useful for stateful flows and logins.

Geo targeting and compliance

All targeting is expressed in the username: country across 195+ countries, US state and city, or ASN/ISP within a country. Only the username changes between regions, keeping your driver setup identical.

Automate lawfully, follow the target site's terms of service, and respect applicable law and sensible request pacing.

See also

Frequently asked questions

Why not use a plain Selenium proxy?

Chrome and Firefox do not accept inline proxy credentials, triggering a login popup. selenium-wire injects the username token and password automatically, so authentication just works.

Which port should I choose?

Use HTTP 9000 for rotating IPs or 10000 for sticky IPs. selenium-wire also supports SOCKS5 on ports 11000 and 12000 if you configure it accordingly.

How do I hold the same IP across a test?

Use port 10000 with a session token like USERNAME-country-us-session-abc-lifetime-30 to keep one residential IP for up to 24 hours.

Can I run tests from a specific country?

Yes. Set the country token in the username, such as USERNAME-country-gb, choosing from 195+ countries plus US state, city, and ASN targeting.

Is generating credentials chargeable?

No. Generating credentials is free; only the traffic your browser routes through the proxy consumes prepaid bandwidth.

Related posts

All posts

Get started.

Create an account, generate a credential, connect. The API is the same one the dashboard uses.