Chrome automation by Google. Configure Puppeteer to use KnoxProxy for headless browser scraping, screenshot capture, and PDF generation.
Install with bundled Chromium.
npm install puppeteerPass proxy via Chrome args.
const browser = await puppeteer.launch({
args: ['--proxy-server=http://gw.knoxproxy.com:7000'],
});Use page.authenticate() for proxy auth.
const page = await browser.newPage();
await page.authenticate({ username: 'USER', password: 'PASS' });Browse through the proxy.
await page.goto('https://httpbin.org/ip');
const content = await page.$eval('pre', el => el.textContent);
console.log(content);Add country to username.
await page.authenticate({ username: 'USER-country-us', password: 'PASS' });Verify exit IP.
await page.goto('https://httpbin.org/ip');/**
* KnoxProxy + Puppeteer -- headless Chrome with proxy.
*/
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({
args: ['--proxy-server=http://gw.knoxproxy.com:7000'],
headless: 'new',
});
const page = await browser.newPage();
await page.authenticate({ username: 'USER', password: 'PASS' });
await page.goto('https://httpbin.org/ip');
const ip = await page.$eval('pre', el => el.textContent);
console.log('Exit IP:', ip);
await browser.close();
})();Close and re-launch browser for new IP, or use -session-{id} in username. page.authenticate can be called with different usernames between navigations.
| Problem | Fix |
|---|---|
| net::ERR_PROXY_CONNECTION_FAILED | Verify --proxy-server arg format and port. |
| Navigation timeout of 30000ms exceeded | Increase timeout: page.goto(url, { timeout: 60000 }). |
| ERR_PROXY_AUTH_FAILED | Call page.authenticate() before any navigation. Verify credentials. |
USER-country-de-city-berlin-session-profile07Order matters -- geo flags before the session flag. The session name is free text; use the profile ID so the mapping is self-documenting. Password stays as issued; no flags belong there. HTTP on :7000, SOCKS5 on :7001, same credentials.
Call page.authenticate({ username, password }) before navigating. This handles the proxy 407 challenge. You must call it for each new page.
Puppeteer does not support per-page proxy settings. Use separate browser instances for different proxy configurations, or use Playwright which supports per-context proxies.
For new projects, Playwright offers better proxy support (per-context proxies, native auth). For existing Puppeteer codebases, KnoxProxy works with the page.authenticate API.
Yes. Use --proxy-server=socks5://gw.knoxproxy.com:7001 in the launch args. Authentication still uses page.authenticate().
Free trial on rotating residential -- 5 minutes setup, no credit card.