Skip to content

Instantly share code, notes, and snippets.

@princePeterHansen
Last active February 28, 2025 10:49
Show Gist options
  • Save princePeterHansen/fa383359a2a0ed7f2de62b3de04bb34c to your computer and use it in GitHub Desktop.
Save princePeterHansen/fa383359a2a0ed7f2de62b3de04bb34c 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