How to set proxychains with public or private proxies

Proxychains is a great tool to have on your PC, either if you plan on using it or not on a daily basis. If you plan on using Beagle Scraper for e-commerce scraping, you will need proxychains, with public or private proxies, to direct your requests through various IPs. In this way, you will avoid getting your machine’s IP banned by the target website(s).

In this article, you will learn

Why proxychains is better with private proxies

I don’t try to brag the benefits of using private proxies over public ones, but here’s a short list with the reasons why you should consider private proxies over public ones:

  • 99.99% uptime – your IPs are always available for use
  • High speed – you are the sole users of these proxies, so you don’t share the server’s speed and bandwidth with hundreds of other users
  • clean IPs – with private proxies you are guaranteed the IPs will connect to any website

For scraping, I recommend you look into SEO proxies, these are cheaper proxies and you can get more IPs for your budget.

Windows alternatives to proxychains

If you have a Windows PC and you need to do your scraping from your PC, you have two alternatives, because proxychains support only Unix based systems.

Use Proxyfier

Proxyfier does the same job, on a Windows PC, as Proxychains on a Linux or Mac. However, there is a small fee that you will need to pay for using this tool with your PC.

Virtual Box and install a virtual machine

The free alternative to Proxyfier is to use VirtualBox and create a virtual Linux machine on your PC. Basically, you need to install VirtualBox, create a Linux image and use proxychains inside your virtual machine. Have a look at this setup, it’s easy to install VirtualBox and there are plenty of tutorials on how to create your little virtual machine.

Install proxychains

Proxychains is an open source project and you can download the source code from GitHub, here. However, if you just plan on using proxychains for scraping or any other low-security web automation or browsing, there is no need to read the source code or any documentation.

All you have to do is to install it first and then set it up.

Installing on Mac with homebrew

Installing on Ubuntu or any other Linux Distro with apt-get

install proxychains ubuntu linux

That’s all! Proxychains is now installed on your PC. Next, right after the installation, before using proxychains, you will need to setup the config file and insert your proxies IPs and login details.

Setup proxychains and your proxies’ details

To setup proxychains, you will need to access the config file, comment and uncomment a couple of lines and paste your public or private proxies’ IPs, ports and login details.

Access the config file

After installing, use the same terminal to access the config file.

For Ubuntu, I will use nano with root access because the /etc/ folder is restricted for editing by normal users. The command used in the terminal is:

Mac users can use Vi to access the config file, by using the following command:

Voila! Now proxychains’ config file is opened in my terminal. Next, you will have to comment and uncomment some lines to setup proxychains.

First, you need to comment strict_chain. All you have to do is to put a # (number sign) in front of strict_chain.

Second, you will need to uncomment random_chain. by removing the # from the line. And your config file should look like this.

proxychains config 1

By now, I think you know what these two lines are doing to proxychains. Simply put, you told proxychains to not use your proxies’ IPs in strict order (strict_chain) but to randomly rotate your proxies when making connections (random_chains). In other words, you instructed proxychains to connect like Tor and randomly use your IPs.

Watch your DNS setup! Although proxychains comes with the proxy_dns uncomment, just make sure it is uncommented. In this way, you will avoid any DNS leak that could disclose your real IP.

proxychains config 2

Setup proxies IPs

The final part of setting up proxychains is to pass it your proxies’ details. First, before starting, make sure you delete or uncomment the default socks4 127.0.0.1 9050 line. You won’t need it if you are going to use your own proxies’ IPs.

Afterward, insert each proxy’s details on a separate line, exactly as it shows it the proxychains config file example or as this format: proxy_type  ip port user login

You can add as many IPs as you have. The more IPs you have, the better, because proxychains will loop through them and use each individual IP less often.

proxychains config 3

Note: You can even mix public and private proxies. To start I recommend a private/public ratio of 1/1. Meaning that for each private proxy, try to use one public proxy as well. Thus, if you have 20 private proxies, you can get 20 public proxies and save them in your proxychains IPs lists. Make sure the public ones are working and that you do not pass the username and password of your private ones (public proxies only require their type, IP and port).

You can find my proxychains config file at the end of this article. Copy it, insert your proxies details and paste it over your default proxychains config file.

How to use proxychains for browsing or for scripts

To use proxychains, all you need to do is to pass the proxychains command in a terminal, before the actual app’ name you plan on using. The format is

Proxychains with Beagle Scraper

To divert your scraping requests through proxychains, all you need to do is to navigate in the folder where you have downloaded Beagle Scraper and pass this command in the terminal:

This command instructs proxychains to start proxychains and divert all requests for Beagle Scraper.

proxychains python script

Proxychains with web browser

If you want to browse through your newly tor-like proxychains setup, all you have to do is to open a terminal and pass the command for instructing proxychains to divert the browser’s requests through your proxies’ IPs. Let’s use Mozilla Firefox with proxychains by passing this command in a terminal:

proxychains firefox private proxies

To wrap up

There are only a few simple steps required to setup proxychains for Beagle Scraper, web browsing or for any other script or app you plan on diverting its request through various IPs.

Here’s the complete proxychains config file

 

GET THE BEST PROXY DISCOUNTS IN YOUR INBOX

Don't worry we don't spam

We will be happy to hear your thoughts

Leave a reply

5 × 1 =

Review, Compare & Get Discount Codes | BestProxyProviders
Compare items
  • Total (0)
Compare
0