Basic setup
Chrome takes a proxy server on the command line but not credentials, so Puppeteer splits the two: the server goes in launch args, credentials go through page.authenticate(). Use the host, port, username and password from the Rayobyte dashboard. Our Puppeteer proxies pillar guide covers the topic in depth.
import puppeteer from "puppeteer";
const browser = await puppeteer.launch({
args: [`--proxy-server=http://${process.env.RAYOBYTE_HOST}:${process.env.RAYOBYTE_PORT}`],
});
const page = await browser.newPage();
await page.authenticate({
username: process.env.RAYOBYTE_USER,
password: process.env.RAYOBYTE_PASS,
});
await page.goto("https://httpbin.org/ip", { waitUntil: "domcontentloaded" });
console.log(await page.evaluate(() => document.body.innerText));
await browser.close();If you've whitelisted your server's IP, skip page.authenticate(). See Puppeteer proxy authentication and Rayobyte authentication options.
Choosing the product
- Premium Residential for protected sites and location-specific pages.
- Rotating ISP when sites accept ISP ranges and you want speed.
- Static ISP for logged-in browser profiles that must keep one IP.
See choosing the right Rayobyte product.
Sticky sessions per browser
Chrome holds connections open, so one browser tends to stay on one exit IP. Make that explicit: put a session ID in the username (using the dashboard's template) and use one session per browser. To change IP, close the browser and launch a new one with a new session. Premium Residential sessions last up to 120 minutes and can end early. See Rayobyte sticky sessions.
Save bandwidth
Browsers download everything. Block what you don't need:
await page.setRequestInterception(true);
page.on("request", (req) => {
const type = req.resourceType();
if (["image", "media", "font"].includes(type)) req.abort();
else req.continue();
});This often cuts bandwidth by more than half, which matters on per-GB products.
Residential tip: You can test most of this guide for free: Rayobyte offers a no-card trial on Premium Residential, rotating ISP and rotating datacenter proxies. Move to a paid plan once the pilot works. See our complete Rayobyte guide.
Stealth
Default headless Chrome is easy to detect. Use a stealth plugin, set a realistic viewport, and match time zone and language to the proxy's location. See Puppeteer stealth proxies. If maintaining stealth is a burden, Rayobyte's hosted rayobrowse browsers handle it for you.
Scaling
- One browser per session, several pages per browser for related URLs.
- Close pages and browsers promptly to release memory and concurrency.
- Use a pool, such as puppeteer-cluster, sized to your server and plan. See Puppeteer cluster proxies.
- Set timeouts on navigation (30 seconds is plenty) and retry with a new session on failure.
SOCKS5 caveat
Chrome doesn't support SOCKS5 with a username and password. Use HTTP, or whitelist your IP if you need SOCKS5. See Puppeteer SOCKS5 proxy.
Common errors
- ERR_TUNNEL_CONNECTION_FAILED: wrong host or port, or targeting too narrow.
- ERR_PROXY_CONNECTION_FAILED: proxy unreachable; check firewall and port.
- 407 or an auth dialog:
page.authenticate()missing or called after navigation.
More in Rayobyte troubleshooting.
Proxy tip: For a second opinion on hard targets, run the same test through Geonode residential proxies, which support sticky sessions up to 24 hours and ASN targeting. We compare the two in using Geonode with Puppeteer.
How it compares
See Rayobyte vs Geonode for Puppeteer, Rayobyte vs Webshare for Puppeteer and all three for Puppeteer.
Not sure this is the right proxy type for the job? The best proxies in 2026 guide compares residential, ISP, datacenter and mobile options, and our cheap proxies guide covers budget picks that still work.
Budget tip: For jobs where a fixed IP list is enough, Webshare is one of the cheapest options: shared datacenter proxies are sold by the IP, and static residential (ISP) proxies cost well under a dollar per IP per month at the time of writing. More in using Webshare with Puppeteer.
Key takeaways
- Pass the Rayobyte host and port via
--proxy-serverand credentials viapage.authenticate(). - Use one sticky session per browser and relaunch to change IP.
- Block images, fonts and media to save bandwidth.
- Consider rayobrowse if stealth maintenance is a burden.
FAQ
Can I set a different Rayobyte proxy per page?
Not with one Chrome instance and launch flags. Use one browser per proxy, or a per-page proxy library. See Puppeteer proxy per page.
Why does my Puppeteer proxy work for the first page only?
Usually an expired sticky session or a dropped residential IP. Start a new session.
Do I need residential proxies for Puppeteer?
Only for protected or location-sensitive sites. Easy sites work with datacenter proxies.
Editorial note: Proxy providers change their pools, features and prices often, so treat any figures here as typical ranges at the time of writing and confirm current terms with the provider before you buy.