How to set up an authenticated proxy in Puppeteer (Node.js)

Updated:

Puppeteer controls Chrome and Chromium over the DevTools Protocol (CDP), providing a native await page.authenticate({ username, password }) API for HTTP 407 proxy authentication. Pairing --proxy-server=http://ip:port with page.authenticate() lets your Node.js scrapers route through VinaProxy static proxies without any external browser extensions.

Puppeteer · HTTP Proxy Format
--proxy-server=http://ip:port + page.authenticate({ username, password })
Private IPv4 (datacenter)
🇺🇸 United States
Available
From
₫20,000 / IP / month
≈ $0.74 · billed in VND
Volume pricing
  • 1 IP₫40,000
  • 5+ IPs₫35,000
  • 10+ IPs₫25,000
  • 20+ IPs₫25,000
  • 50+ IPs₫25,000
  • 100+ IPs₫25,000
  • 200+ IPs₫25,000
  • 500+ IPs₫25,000
  • 1000+ IPs₫22,000
  • 2000+ IPs₫20,000
Buy United States
Private IPv4 (datacenter)
🇸🇬 Singapore
Available
From
₫20,000 / IP / month
≈ $0.74 · billed in VND
Volume pricing
  • 1 IP₫40,000
  • 5+ IPs₫35,000
  • 10+ IPs₫25,000
  • 20+ IPs₫25,000
  • 50+ IPs₫25,000
  • 100+ IPs₫25,000
  • 200+ IPs₫25,000
  • 500+ IPs₫25,000
  • 1000+ IPs₫22,000
  • 2000+ IPs₫20,000
Buy Singapore

Two-step proxy configuration in Puppeteer

Never embed user:pass@ inside the --proxy-server launch argument. Instead, pass the host and port at launch and authenticate on the Page instance:

StepPuppeteer CodeWhy It Matters
1. Launch Chromiumpuppeteer.launch({ args: ['--proxy-server=http://ip:port'] })Points Chromium's network socket at your VinaProxy proxy
2. Authenticate Pageawait page.authenticate({ username, password })Supplies CDP credentials for HTTP 407 challenges
3. Navigateawait page.goto(url, { waitUntil: 'domcontentloaded' })Loads the target URL through the authenticated tunnel

Rotating multiple proxies across tabs with proxy-chain

  • Remember that page.authenticate() is scoped per Page tab—call it on every new tab returned by browser.newPage()
  • To use different proxies across incognito contexts inside a single Chromium process, wrap each http://user:pass@ip:port URL with the proxy-chain npm package (anonymizeProxy()) and pass proxyServer to browser.createBrowserContext({ proxyServer })
  • Compatible with puppeteer-extra and puppeteer-extra-plugin-stealth

Step by step

  1. 1

    Pass --proxy-server=http://ip:port to puppeteer.launch()

    Launch the browser with const browser = await puppeteer.launch({ args: ['--proxy-server=http://ip:port'] });.

  2. 2

    Call await page.authenticate() on the new page

    Open a tab with const page = await browser.newPage(); and call await page.authenticate({ username: 'USER', password: 'PASS' });.

  3. 3

    Test the exit IP address

    Run await page.goto('https://vinaproxy.com/api/my-ip'); and inspect the returned JSON.

  4. 4

    Clean up browser processes

    Call await browser.close(); when the job finishes.

Frequently asked questions

Why does Puppeteer throw `ERR_NO_SUPPORTED_PROXIES`?

That error occurs if you include user:pass@ inside --proxy-server=http://user:pass@ip:port. Keep --proxy-server=http://ip:port clean and pass credentials via await page.authenticate({ username, password }).

Why did a second tab opened with `browser.newPage()` fail with HTTP 407?

page.authenticate() applies per tab. Call await secondPage.authenticate({ username, password }) before navigating on any newly opened tab.

Are VinaProxy proxies unmetered for headless Chrome scraping?

Yes. All Dedicated IPv4 and Static ISP plans include unlimited monthly bandwidth.

Power your Node.js Puppeteer fleet with static IPs

Instant unmetered Dedicated IPv4 and Static ISP proxies across 7 countries.

Buy Puppeteer Proxies

Related articles

Proxies by platform
Proxies for Web Scraping: unmetered dedicated IPv4 & ISP pools for 24/7 crawlers
High-speed HTTP(S) dedicated IPv4 and Static ISP proxies for Python, Playwright, Selenium, and Scrapy with unlimited monthly bandwidth.
Proxy setup
How to set up a proxy in Playwright (Browser & Per-Context Auth)
Configure authenticated HTTP(S) proxies in Playwright for Node.js and Python. Run multiple isolated static IPs across BrowserContexts.
Proxy setup
How to set up a proxy in Node.js (Axios & Native Fetch)
Configure authenticated HTTP(S) proxies in Node.js and TypeScript using https-proxy-agent with Axios and Undici ProxyAgent with native fetch.
Free tools
Bulk Proxy Format Converter (100% Client-Side)
100% client-side bulk proxy list formatter. Convert between ip:port:user:pass, user:pass@ip:port, http:// URLs, SOCKS5 URIs, JSON arrays, and FoxyProxy exports.
Proxies by platform
Proxies for SEO & SERP Tracking: accurate keyword rankings across 7 countries
Track localized keyword rankings, audit geo-redirects, and run Screaming Frog crawls with unmetered dedicated IPv4 and Static ISP proxies.
Proxies by platform
Proxies for YouTube: isolate multi-channel Studio & AdSense accounts
Isolate YouTube Studio channels and AdSense accounts with unmetered Static ISP and dedicated IPv4 proxies in the US, Vietnam, Japan, and UK.
IPV4 · united states
US Private IPv4 Proxies: Fast, Dedicated American Datacenter IPs
Dedicated US private IPv4 proxies for scraping, rank tracking, ad checks and Amazon research. Static IP, one user per IP, unlimited bandwidth, fast activation.
IPV4 · singapore
Singapore Private IPv4 Proxies: Fast, Dedicated SG IPs for Regional Selling and Ads
Dedicated Singapore private IPv4 proxies for Lazada and Shopee SG stores, regional ad accounts, ad verification and low-latency automation. Unlimited data.