This step-by-step guide will show you how to integrate Anonymous Proxies' proxies in Puppeteer, whether you're using static proxies, rotating proxies, or proxy lists.
HTTP Proxies are handling HTTP requests towards the internet on behalf of a client. They are fast and very popular when it comes to any kind of anonymous web browsing.
SOCKSv5 is an internet protocol that is more versatile than a regular HTTP proxy since it can run on any port and traffic can flow both on TCP and UDP. Useful in games and other applications that do not use the http protocol.
Puppeteer is a Node.js library which is created by Google that provides a high-level API to control Chrome or Chromium. Also, it excels in:
Before we go into details, be sure that you have a code editor installed, such as VS Code or any other editor of your choice.
Be sure that you have Node.js (along with npm) installed on your machine. You can confirm by typing these commands in your terminal.
node -vnpm -v
Then you need to install Puppeteer if it isn’t already installed. Just type this command in your terminal.
npm install puppeteer
Now, for proxy details, log in into Anonymous Proxies dashboard and go to your dedicated proxies to see your proxy's credentials. These are usually:
Your dedicated proxy’s IP address or domain name
Proxy's port number
Your username and password, if you enabled authentication
Once you went through all these prerequisites, you are ready to set up your proxies in Puppeteer.
Below is a concise example of how to make Puppeteer work with your proxies. Simply open up your Node.js script, paste this snippet in and adjust the placeholders to match your actual proxy details.
const puppeteer = require('puppeteer');(async () => {// Replace with your host and port from the Anonymous Proxies dashboard.// 1. HTTP or SOCKS5// - For an HTTP proxy, use: http://YOUR_PROXY_ADDRESS:PORT// - For a SOCKS5 proxy, use: socks5://YOUR_PROXY_ADDRESS:PORTconst proxyServer = 'YOUR_PROXY_ADDRESS:PORT';const browser = await puppeteer.launch({args: [`--proxy-server=${proxyServer}`],headless: true});const page = await browser.newPage();// If you enabled authentication in the dashboard for your proxies, be sure that you input your credentials below.await page.authenticate({username: 'YOUR_USERNAME',password: 'YOUR_PASSWORD'});// Test the proxy's connection by navigating to any websiteawait page.goto('https://example.com');console.log('Page title:', await page.title());// Close the browser when doneawait browser.close();})();
This is only an example for static proxies. For additional proxy setups like lists or rotating proxies, keep reading below.
If you’re facing aggressive rate limits or need to handle large-scale data scraping, rotating proxies are your best friend. Simply replace the proxyServer
line with your rotating proxy endpoint, which might look like:
const proxyServer = 'http://USERNAME:PASSWORD@ROTATING_PROXY_ADDRESS:PORT';
If you’d like to alternate between several static or rotating proxies, you can store them in an array:
const proxyList = ['PROXY_1_IP:PORT','PROXY_2_IP:PORT','PROXY_3_IP:PORT'];
Then, simply select one at random (or any logic you prefer) each time Puppeteer launches:
const randomProxy = proxyList[Math.floor(Math.random() * proxyList.length)];const browser = await puppeteer.launch({args: [`--proxy-server=${randomProxy}`]});
And that’s it! As you've seen, if you pair Puppeteer with Anonymous Proxies, you’ll be able to avoid geo-restrictions, boost your anonymity and drastically reduce the chance of hitting IP-related roadblocks. Whether you stick to a single static IP, a rotating proxy if you want to change your IP frequently or juggle between multiple IPs from a proxy list, this guide will help you get your proxies in place in just a few minutes.
If you encounter any problems with integrating Anonymous Proxies in Puppeteer, feel free to contact our support team and if you want to see more integration tutorials, be sure that you take a look on our integrations page.
@2025 anonymous-proxies.net