Most proxy tutorials focus on Python, but a massive portion of the scraping community uses Node.js with Playwright and Puppeteer. These browser automation frameworks are essential for scraping JavaScript-heavy single-page applications.

Playwright Setup

Playwright has first-class SOCKS5 support. Configure it with Snowpad:

const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch({
    proxy: {
      server: 'socks5://gw.snowpad.io:9999',
      username: 'your_username',
      password: 'your_password'
    }
  });

  const context = await browser.newContext({
    userAgent: 'Mozilla/5.0 (Linux; Android 14; SM-S928B) AppleWebKit/537.36'
  });

  const page = await context.newPage();
  await page.goto('https://httpbin.org/ip');
  console.log(await page.textContent('body'));
  await browser.close();
})();

Puppeteer Setup

Puppeteer requires proxy-chain for SOCKS5 authentication:

const puppeteer = require('puppeteer');
const proxyChain = require('proxy-chain');

(async () => {
  const oldProxyUrl = 'socks5://username:password@gw.snowpad.io:9999';
  const newProxyUrl = await proxyChain.anonymizeProxy(oldProxyUrl);

  const browser = await puppeteer.launch({
    args: [`--proxy-server=${newProxyUrl}`]
  });

  const page = await browser.newPage();
  await page.goto('https://httpbin.org/ip');
  console.log(await page.evaluate(() => document.body.textContent));

  await browser.close();
  await proxyChain.closeAnonymizedProxy(newProxyUrl, true);
})();

Playwright vs Puppeteer

Playwright is recommended for proxy use because it natively supports SOCKS5 authentication. Puppeteer requires external packages like proxy-chain for authenticated proxies.

FAQ

Which is better for proxy scraping: Playwright or Puppeteer? Playwright is better for proxy use because it natively supports SOCKS5 authentication. Puppeteer requires external packages for authenticated proxies.

Do I need stealth plugins with Snowpad proxies? Snowpad's mobile IPs already provide excellent stealth at the network level. Stealth plugins add browser-level evasion for heavily protected sites.

Can I run Playwright headless with proxies? Yes. Playwright runs headless by default. Combine with a mobile User-Agent and Snowpad proxy for undetectable headless scraping.