Best of Linux

Best Self-Hosted Proxy Servers

You may not realize it, but there are many third parties that manipulate your internet content. Your ISP might restrict access to certain websites, search engines hides search results to comply with various anti-piracy acts, and websites themselves often show different content to visitors from different geographical regions.

If this doesn’t sit well with you, you should consider using a self-hosted proxy server to get past geographic restrictions and other forms of censorship. Self-hosted proxy servers can also help you reduce bandwidth and improves response times by caching frequently-requested web pages, and some come with advanced filtering capabilities that make it possible to get rid of ads or protect children from harm.

Our selection reflects the wide range of self-hosted proxy servers and their capabilities. Some self-hosted proxy servers described in this article are easier to set up than others, but we believe that anyone willing to spend some time reading an online tutorial should be able to install and configure just about any self-hosted proxy server available.

1. Privoxy

Privoxy is a non-caching web proxy with filtering capabilities for enhancing privacy. It can modify web page data and HTTP headers, control access, and remove ads.

The first version of Prixovy was released in 2001, based on the Internet Junkbuster, an older ad-blocking web proxy released under the GNU General Public License. Until 2010, the Tor Project used to bundle Privoxy with Tor, but they ultimately decided to stay away from third-party solutions for security reasons.

Prixovy is available on virtually all popular operating systems and platforms, including Linux, OpenWrt, DD-WRT, Windows, macOS, OS/2, AmigaOS, and BeOS. While Prixovy is fairly easy to install and get running, as we explain in the next section of this article, fine-tuning its various settings is far from trivial and requires a fairly advanced understanding of computer networks.

2. Squid

Squid is a caching proxy with support for HTTP, HTTPS, FTP, and other protocols. Caching proxies temporarily store frequently used data to reduce bandwidth and improve response times.

Squid started its life in 1996 as the Harvest object cache, which was part of a research project by the Internet Research Task Force Research Group on Resource Discovery (IETF-RD). The current version of Squid is a fork of the last pre-commercial version of Harvest, and its name was chosen to prevent confusion with the commercial fork called Cached 2.0.

Squid runs on all popular operating systems, and it’s used by hundreds of ISPs around the world to provide their users with the best possible internet experience. Websites use Squid to improve their content delivery, which means that knowing how to install and configure it could help you land a great job.

3. Pi-hole

Pi-hole is a DNS sinkhole that can block advertisement and inappropriate content at the network-level. As its name suggests, Pi-hole is intended for use with the Raspberry Pi single-board computer, which is developed in the United Kingdom by the Raspberry Pi Foundation and is providing low cost systems that are accessible to people of all economic backgrounds and can be used for educational purposes.

At the core of Pi-hole are various open source technologies such as dnsmasq, cURL, and Lighttpd, which allow it to block DNS requests for known tracking and advertising domains. Because Pi-hole works at the network level, it prevents ads from being displayed even on smart TVs and mobile devices running Android and iOS.

4. SwiperProxy

SwiperProxy is an extremely efficient web proxy written in Python. If you’d like to learn how proxy servers work under the hood, SwiperProxy is an excellent place to start because it’s open source, hosted on GitHub, and runs on a self-containing, minimalist web server. It works great with all major web servers, including Apache, Nginx, and Varnish, and is configured through only 25 well-documented options.

To get started with SwiperProxy, we recommend you read the quick-start guide, which you can find here.

5. Traefik

Træfɪk is a modern reverse proxy and load balancer that’s fully open source, easy to configure, and designed with modern cloud-based services in mind. It’s written in the Go programming language and exposes a Rest API.

Træfɪk is typically deployed to orchestrate multiple cloud services, allowing you to add, remove, kill, upgrade, or scale services with ease. Because Træfɪk is packaged as a single binary file and available as a tiny official docker image, installing it could hardly be any easier.

How to Install and Configure Privoxy

The good news is that Prixovy is available both as raw source code and in convenient pre-compiled packages for a wide range of operating systems. Unless you know exactly what you’re doing, start with the packages, which can be downloaded from here.

Ubuntu users can install Prixovy using the following command:

# sudo apt-get install privoxy

And many other Linux distributions, including Red Hat and Fedora, also have Privoxy in repositories.

Regardless of which installation method you use, you will need to go to /etc/privoxy because that’s where the Privoxy configuration files are located.

Because Privoxy is mainly written for people who are already familiar regular expressions, HTTP, and HTML—or are willing to learn them—its configuration is fairly complicated. Fortunately, the default installation is basically ready to go. To learn how to fine-tune Privoxy to your liking, read the official configuration guide.

The only thing you really need to do before using Privoxy for the first time is to configure your web browser to use Privoxy as a HTTP and HTTPS proxy. Simply go to your web browser’s settings, navigate to the proxy category and use 127.0.0.1 (or localhost) for the proxy address and 8118 for the port.

Conclusion

Knowing how to install a configure popular self-hosted proxy servers allows you to exercise greater control over your internet experience. There are many wonderful solutions worth exploring, and we’ve only scratched the surface of what’s possible.

About the author

David Morelo

David Morelo is a professional content writer in the technology niche, covering everything from consumer products to emerging technologies and their cross-industry application