From FreeBSDwiki
Jump to: navigation, search

Polipo is a caching proxy server. Installing this port enables both caching of web pages and filtering of content.

To install this program, you can either install it as a package using

pkg_add -r polipo

Or build it by doing

cd /usr/ports/www/polipo && make install clean

The default configuration file is at /usr/local/etc/polipo/config.sample. This file should be updated then moved to /usr/local/etc/polipo/config

To enable Polipo, the user should add polipo_enable="YES" to /etc/rc.conf

If you wish to enable adblocking using polipo, there are two scripts which can parse adblock lists (such as

For Python there is

For Ruby there is

To use these scripts, download them and make them executable (chmod +x). Ensure you have either Python or Ruby installed to run these scripts. If you have neither, you can type pkg_add -r python to install python, or pkg_add -r ruby to install Ruby via packages.

Once you have downloaded and set the script to executable, you can them download the EasyList adblock list. To do this, move the EastList list to the same directory as the adblock conversion script, then type

./ easylist.txt >> /usr/local/etc/polipo/forbidden
for the Python script


./adblock2polipo.rb easylist.txt >> /usr/local/etc/polipo/forbidden
for the Ruby script

This will block ads based on the rules in the list that was downloaded.

You can now (re)start Polipo by executing

/usr/local/etc/rc.d/polipo restart
Personal tools