Puppeteer
Basic Usage
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch({ args: ['--proxy-server=http://connect.trueproxies.com:8080'],});
const page = await browser.newPage();
await page.authenticate({ username: 'your_username', password: 'your_password',});
await page.goto('https://httpbin.org/ip');const content = await page.content();console.log(content);
await browser.close();import puppeteer from 'puppeteer';
const browser = await puppeteer.launch({ args: ['--proxy-server=socks5://connect.trueproxies.com:1080'],});
const page = await browser.newPage();
await page.authenticate({ username: 'your_username', password: 'your_password',});
await page.goto('https://httpbin.org/ip');const content = await page.content();console.log(content);
await browser.close();Country Targeting
await page.authenticate({ username: 'your_username-country-us', password: 'your_password',});Sticky Sessions
await page.authenticate({ username: 'your_username-session-abc123', password: 'your_password',});Multiple Pages with Different IPs
const browser = await puppeteer.launch({ args: ['--proxy-server=http://connect.trueproxies.com:8080'],});
const urls = ['https://example.com', 'https://example.org'];
for (const url of urls) { const page = await browser.newPage(); await page.authenticate({ username: 'your_username', password: 'your_password', }); await page.goto(url); console.log(`${url}: loaded`); await page.close();}
await browser.close();