Puppeteer proxy setup
Puppeteer is one of the most common HTTP clients in scraping stacks. Point it at a PinguProxy endpoint and every request it makes exits through your proxy IP — static or rotating, over HTTP or SOCKS5.
Why use proxies with Puppeteer
Direct requests expose your home IP and get rate-limited fast. With Puppeteer behind PinguProxy, retries and bursts come from proxy IPs instead, so targets see distributed traffic instead of one noisy client.
What you can do
- ◆Keep one static IP per job so a target can whitelist or cookie you consistently.
- ◆Rotate per request with SOCKS5h so scraping bursts look like real distributed traffic.
- ◆Pool sessions with retries for long-running jobs that survive 429s and timeouts.
- ◆Use IPv4 or IPv6 exits depending on what the target infrastructure supports.
Setup snippets
Replace username, password, and port with the credentials from your dashboard. All examples route both HTTP and HTTPS traffic through the proxy.
const puppeteer = require("puppeteer");const browser = await puppeteer.launch({args: ["--proxy-server=http://username:password@proxy.pinguproxy.com:12933"],});const page = await browser.newPage();await page.goto("https://pinguproxy.com/ip");console.log(await page.evaluate(() => document.body.innerText));await browser.close();
const puppeteer = require("puppeteer");// SOCKS5 keeps DNS on the proxy, so the exit IP is never leaked.const browser = await puppeteer.launch({args: ["--proxy-server=socks5://username:password@proxy.pinguproxy.com:12933"],});const page = await browser.newPage();await page.goto("https://pinguproxy.com/ip");console.log(await page.evaluate(() => document.body.innerText));await browser.close();
const puppeteer = require("puppeteer");const browser = await puppeteer.launch({args: ["--proxy-server=proxy.pinguproxy.com:12933"]});const page = await browser.newPage();await page.authenticate({username: "username", password: "password"});await page.goto("https://pinguproxy.com/ip");console.log(await page.evaluate(() => document.body.innerText));await browser.close();
The port shown (12933) is the default example; your dashboard lists the exact endpoints for your proxies. SOCKS5h keeps DNS lookups on the proxy so your real DNS server never sees the target domains.
Frequently asked questions
Does Puppeteer support SOCKS5?
Yes — modern Puppeteer bundles the socks support needed for socks5h:// URLs; just install requests[socks] if your environment asks for it.
How do I rotate IPs per request with Puppeteer?
Point Puppeteer at the rotating SOCKS5h endpoint: each new connection picks a fresh exit IP, while sticky sessions keep one IP until you ask for a new one.
Can I keep the same IP for a whole scraping session?
Yes. Use the static HTTP endpoint and the same proxy URL for every request — the exit IP stays fixed until you switch proxies in the dashboard.
Other setup guides
Create a proxy in the dashboard and paste your credentials into the snippets above — unlimited bandwidth on every plan.