Step-by-step guide to setting up HTTP, HTTPS, SOCKS5, and rotating proxies with Puppeteer in 2026. Includes authenticated proxy setup, anti-detection tips, and code examples.
Puppeteer is the go-to library for headless browser automation in Node.js. It controls a real Chromium browser, which makes it powerful — but also makes it a prime target for bot detection systems like Cloudflare, Akamai, and DataDome.
If you're running Puppeteer without proxies, a single ban takes down your entire operation. This guide shows you exactly how to use HTTP, HTTPS, SOCKS5, and rotating proxies with Puppeteer — with working code examples for each setup.
Puppeteer is a Node.js library developed by the Chrome team that provides a high-level API to control Chromium. Unlike simple HTTP scrapers, Puppeteer renders JavaScript, executes dynamic pages, and can interact with a page exactly like a human would — clicking, typing, scrolling.
Common use cases:
Web scraping (SPAs, JavaScript-heavy pages) Screenshot and PDF generation Automated testing (E2E tests) Price monitoring and data collection Social media automation
The problem: all of these look the same to a bot detection system. Without proxies, your server's IP gets flagged after a handful of requests.
When you run Puppeteer without a proxy, every request comes from the same IP — your server. Websites quickly notice:
High request frequency from a single IP No cookies or browsing history on fresh browser instances Datacenter IP ranges (AWS, GCP, DigitalOcean) that are immediately blacklisted by some sites
Proxies solve this by:
Distributing requests across many different IPs — no single IP takes all the heat Hiding your server identity — the site sees a residential or mobile IP, not your datacenter Enabling geo-targeting — appear to browse from the USA, UK, Germany, or any other country Bypassing rate limits — rotate IPs to stay under per-IP request thresholds
The simplest way to route Puppeteer through a proxy is via the --proxy-server launch argument. This works for HTTP and HTTPS proxies.
Replace YOURPROXYHOST:PORT with your proxy address — for example proxy.xproxy.io:8080.
> Tip: The --proxy-server flag applies to the entire browser instance. All pages and tabs opened in that browser will use the proxy.
Most quality proxy providers — including the ones available on xProxy Market — require authentication. Puppeteer handles this via page.authenticate().
Important: Call page.authenticate() before page.goto(). If you navigate first, the authentication prompt may cause the request to fail silently.
SOCKS5 proxies operate at a lower level than HTTP proxies — they tunnel all TCP traffic, not just web requests. This makes them more versatile and sometimes faster.
The only change is the protocol prefix: socks5:// instead of http://. Puppeteer (via Chromium) handles the rest.
For large-scale scraping, you need to rotate proxies — use a fresh IP for every request or every N requests. The cleanest approach is to close the browser after each target and relaunch with a new proxy.
For production-scale rotation, consider providers that offer a rotating gateway endpoint — one hostname that automatically serves a new IP on each connection. Many plans on xProxy Market include this.
Not all proxies are equal. Here's how the three main types perform with Puppeteer:
| Proxy Type | Detection Risk | Speed | Cost | Best For | |---|---|---|---|---| | Datacenter | High | Very fast | Cheap | Internal tools, low-security sites | | Residential | Low | Good | Mid-range | Most scrapers, account automation | | Mobile (4G/5G) | Very low | Good | Premium | Sneaker bots, social media, Cloudflare bypass |
For most Puppeteer scraping tasks, residential proxies offer the best balance. For platforms with aggressive bot detection (e.g., Nike, Instagram, Google SERP scraping), mobile proxies are the only reliable choice.
> Read our deeper comparison: Mobile vs Residential vs Datacenter Proxies
If you need to target a specific country — for price comparison, geo-restricted content, or local SERP results — use country-specific IPs. xProxy Market offers proxies in the USA, UK, Germany, and 45+ other countries.
Puppeteer in default mode has many fingerprinting tells. Combine proxy rotation with these techniques to stay undetected:
The stealth plugin patches over 20 Puppeteer fingerprinting leaks — navigator.webdriver, Chrome runtime checks, canvas fingerprinting, and more. It's the single most impactful addition you can make.
Don't scrape 100 pages/second — slow down to 1–3 pages/second Randomize the order of URLs, not strictly sequential Accept cookies when prompted — real users do Mix in page.mouse.move() and scroll events on interactive pages
Before you deploy Puppeteer at scale, run through this list:
[ ] --proxy-server flag set on browser launch [ ] page.authenticate() called before first navigation