Public data collection
Load public pages, such as prices, listings and search results, the way a visitor in that country sees them.
Puppeteer drives Chrome from Node.js. Point it at gate.proxyhat.com, log in with page.authenticate, and every page exits through a residential or mobile IP in the country you choose: a fresh IP per connection, or one sticky IP per worker.
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.
Run end-to-end tests of your own site as an outside visitor: geo-redirects, CDN rules, consent banners and checkout by country.
| 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. Save as an .mjs file and run it with Node.js after npm install puppeteer.
import puppeteer from 'puppeteer';
// Chromium takes the proxy address as a launch flag...
const browser = await puppeteer.launch({
args: ['--proxy-server=http://gate.proxyhat.com:8080'],
});
const page = await browser.newPage();
// ...and the credentials per page. No -sid-: every new connection can exit from a new IP.
await page.authenticate({
username: 'USERNAME-country-US',
password: 'PASSWORD',
});
await page.goto('https://httpbin.org/ip');
console.log(await page.$eval('body', (el) => el.innerText));
await browser.close();--proxy-server sets only the address: Chromium ignores a user:pass part in that flag, so page.authenticate answers the gateway’s login challenge. Without -sid- in the username, every new connection can get a new IP.
Tested on November 28, 2026 against gate.proxyhat.com with Puppeteer 25.19 and Chrome 158: the rotating sample printed a US IP, the sticky sample three different US IPs.
Checked against: Puppeteer: Page.authenticate, Puppeteer: Browser.createBrowserContext · 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 →
No. Chromium supports SOCKS5 proxies only without authentication, so a SOCKS5 proxy with a password won’t log in. Use HTTP on port 8080 with page.authenticate, as in the samples; it carries HTTPS sites too.
Chromium ignores credentials in that flag. The flag sets the address; the login is sent when the gateway asks for it (HTTP 407), which is what page.authenticate does.
Give each worker its own sid in the username and its own browser context (browser.createBrowserContext()), as in the sticky sample. One sid handles about 4–5 parallel connections, so don’t share it between workers.
As long as the -ttl- flag says, up to 24 hours: -ttl-30m, -ttl-1h, -ttl-24h. For an IP that doesn’t rotate on a timer, use -sid- with -norotate-true and no -ttl-.
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.
The gateway didn’t accept the login. Check that page.authenticate runs before page.goto and that the username and password are copied exactly from your dashboard. The errors table above lists the other codes.
Playwright takes the server, username and password in its proxy launch option, so it needs no separate authenticate step. Our Playwright guide, linked below, walks through rotating proxies there.
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