Public data collection
Load public pages, such as prices, listings and search results, the way a visitor in that country sees them.
Chrome won’t take proxy credentials from Selenium options. Since Selenium 4.32, WebDriver BiDi answers the proxy login for you, with no extension and no selenium-wire. Below: tested Python and Node.js code for rotating and sticky residential IPs.
Load public pages, such as prices, listings and search results, the way a visitor in that country sees them.
Check that geo-targeted pages, translations and ads render correctly in each market, from a residential or mobile connection there.
Point your existing Selenium test suite at other countries: geo-redirects, CDN rules, consent banners and checkout as an outside visitor sees them.
| Host | gate.proxyhat.com |
|---|---|
| SOCKS5 port | 1080 |
| HTTP port | 8080 |
| Authentication | Username and password from the Proxies page of your dashboard |
| Username for one browser | USERNAME-country-US-sid-a3f8c20d1e-ttl-30m |
Everything after your username is a flag: -country-US picks the exit country, -type-mobile the mobile carrier pool, -sid-… keeps one IP and -ttl-30m sets for how long (up to 24 hours). Leave out -type-mobile for residential IPs.
Replace USERNAME and PASSWORD with the proxy credentials from the Proxies page of your dashboard. Python: pip install -U selenium (4.32 or newer). Node.js: npm install selenium-webdriver.
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.bidi.browsing_context import ReadinessState
options = webdriver.ChromeOptions()
options.enable_bidi = True # proxy login runs over WebDriver BiDi
options.add_argument("--headless=new")
options.add_argument("--proxy-server=http://gate.proxyhat.com:8080")
driver = webdriver.Chrome(options=options)
# Chrome won't take credentials in the proxy URL: answer its 407 challenge instead.
driver.network.add_auth_handler("USERNAME-country-US", "PASSWORD")
# Navigate over BiDi: a classic driver.get() would block the auth reply in ChromeDriver.
driver.browsing_context.navigate(context=driver.current_window_handle,
url="https://httpbin.org/ip", wait=ReadinessState.COMPLETE)
print(driver.find_element(By.TAG_NAME, "body").text)
driver.quit()enable_bidi turns on WebDriver BiDi, and network.add_auth_handler answers the gateway’s 407 challenge. Load pages with browsing_context.navigate: in our test a classic driver.get() hung until it timed out, because ChromeDriver runs one command per session at a time and the login reply waited behind the page load.
Tested on November 28, 2026 against gate.proxyhat.com with Selenium 4.54.0 and Chrome 158 (the Python rotating sample also with Selenium 4.32.0). Every sample printed a US IP; the sticky sample printed the same IP twice.
Checked against: Selenium: WebDriver BiDi network, Selenium docs example (Python), Selenium Python changelog (4.32.0) · checked November 28, 2026
The session type is part of the username. Your code stays the same; only the login string changes.
No session ID: each new connection can exit from a different IP. Good for many independent page loads.
USERNAME-country-USAdd -sid- with 10 random hex characters and a -ttl-: the IP holds for that long (10m, 30m, 1h, up to 24h). Use it for multi-page flows that should stay on one address.
USERNAME-country-US-sid-a3f8c20d1e-ttl-30mAdd -sid- with -norotate-true and no -ttl-: the IP doesn’t rotate on a timer and stays until you switch to a new sid.
USERNAME-country-US-sid-a3f8c20d1e-norotate-trueOne sid holds one exit IP and handles about 4–5 connections at a time, so give every worker or browser its own sid. Sticky sessions last up to 24 hours. Add -type-mobile for 4G/5G carrier IPs; leave it out for residential.
407 Proxy Authentication Required | The gateway didn’t accept the login: the username or password is wrong, or the username format is (a typo in a flag such as -country-US). Copy both from the Proxies page of your dashboard and make sure the auth step runs before the first page load. |
|---|---|
402 Payment Required | The traffic balance is used up, or the sub-user has reached its traffic limit. Top up or raise the limit in the dashboard; traffic you buy never expires. |
ERR_TUNNEL_CONNECTION_FAILED | Chrome’s name for a proxy that refused the connection, and it can hide a 402 or another gateway status. Send the same username and password through curl -x http://gate.proxyhat.com:8080 to see the real code. |
ERR_PROXY_CONNECTION_FAILED | Chrome couldn’t reach the gateway at all. Check the host and port (gate.proxyhat.com, 8080 for HTTP) and that your network allows outgoing connections to it. |
All gateway errors and username flags are in the documentation: ProxyHat docs →
Mobile and residential traffic share one price and one balance: from $4.00/GB for a 1 GB pack down to $1.80/GB for 1,000 GB. Traffic never expires, and all your browsers draw from the same balance. See pricing →
Selenium 4.32 or newer for Python: network.add_auth_handler arrived in 4.32.0, and 4.31 lacks the BiDi modules the samples import. We tested 4.54.0 with Chrome 158. Keep Chrome and ChromeDriver on the same major version; Selenium Manager handles that for you.
Chrome reads only the address from them and ignores a user:pass part. The password has to be sent when the gateway asks for it (HTTP 407), which is what the BiDi auth handler does.
With the auth handler on, driver.get() hung in our test until it timed out: ChromeDriver handles one command per session at a time, and the BiDi reply with the credentials waited behind the page load. Navigate over BiDi; find_element and the other classic commands work as usual afterwards.
No. selenium-wire is archived and no longer maintained, and a Chrome extension adds one more moving part. The BiDi auth handler is built into Selenium.
Not with a password in Chrome: Chromium supports SOCKS5 only without authentication. Use HTTP on port 8080; it carries HTTPS sites too.
Start one driver per worker and give each its own sid, as new_driver() does in the sticky sample. A sid handles about 4–5 parallel connections and keeps its IP for the -ttl- you set, up to 24 hours.
Add -country- with a two-letter code (residential IPs in 195+ countries) and -type-mobile for 4G/5G carrier IPs (150+ countries). Mobile and residential cost the same and draw from one balance.
Not for pages that render without JavaScript: an HTTP client such as requests takes the same gateway, username and password and uses far less traffic. Our Python proxy guide, linked below, covers requests and the ProxyHat SDK.
Create an account, buy a small pack and run the samples above before you scale out.
Pay as you go · Traffic never expires · Crypto checkout