Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save epk2112/286efa602df89e53b3c62c3f76fa4519 to your computer and use it in GitHub Desktop.
Save epk2112/286efa602df89e53b3c62c3f76fa4519 to your computer and use it in GitHub Desktop.
Using a proxy in puppeteer
const puppeteer = require('puppeteer');
async function run() {
const browser = await puppeteer.launch({
headless: false,
args: [ '--proxy-server=200.73.128.156:3128' ]
});
const page = await browser.newPage();
const pageUrl = 'https://whatismyipaddress.com/';
await page.goto(pageUrl);
}
run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment