Intégration proxy Puppeteer

Puppeteer sets the proxy as a Chromium launch argument, then supplies the username and password through page.authenticate(). This two-step pattern is the idiomatic way to run authenticated proxies in headless Chrome, and it works the same in headful mode for debugging.

scrape.jsjavascript
import puppeteer from "puppeteer";

// Residential gateway, or "--proxy-server=http://IP:PORT" for one of your ISP proxies.
const browser = await puppeteer.launch({
  args: ["--proxy-server=http://gw-eu.murphyproxies.com:8888"],
});

const page = await browser.newPage();

// Chrome takes the credentials here, not on the launch argument.
await page.authenticate({
  username: "USERNAME",
  password: "PASSWORD",
});

await page.goto("https://httpbin.org/ip", { waitUntil: "networkidle0" });
console.log(await page.evaluate(() => document.body.innerText));

await browser.close();

Configuration en 5 étapes

  1. 1Install the client with npm install puppeteer.
  2. 2Pass --proxy-server=http://gw-eu.murphyproxies.com:8888 in the launch args (another gw- region, port 7777 on Private 2, or http://IP:PORT for an ISP proxy).
  3. 3Call page.authenticate() with the username and password from your dashboard before navigating.
  4. 4Navigate with waitUntil set to networkidle0 so the page settles before you read it.
  5. 5Evaluate document.body.innerText on an IP echo page to confirm the exit IP.

Questions sur les proxies Puppeteer

Tout ce qu'il faut pour faire passer Puppeteer par Murphy, de l'authentification à la rotation.

Récupérez vos identifiants pour Puppeteer

Choisissez le réseau selon votre cible : les proxies ISP pour des sessions rapides et stables, les résidentiels pour multiplier les IP face aux anti-bots les plus stricts.