Let's look at an example of configuring Privoxy and Tinyproxy to work in Tor or I2P networks.
Both Privoxy and Tinyproxy are light proxy servers and work well under BSD-UNIX and GNU/Linux, I will show you an example of setup in FreeBSD.
As always, we start with the installation.
make auto
cd /usr/ports/www/privoxy/
make install clean
or
pkg install privoxy
The configuration on FreeBSD is in this path /usr/local/etc/privoxy/config if you have another operating system you can find it with the command
find / -name privoxy
Open and edit the configuration file with any editor you like:
ee /usr/ports/www/privoxy/config
In the listen-address line we specify your address and port on which the proxy server will work, by default it is 127.0.0.1:8118
To make all traffic go through Tor add a line or only through Tor network, respectively:
forward-socks5t / 127.0.0.1:9050 . or forward-socks5 .onion localhost:9050 .
To work with I2P network add the following similarly to the above example:
forward / 127.0.0.1:4444 or forward .i2p 127.0.0.1:4444
In the application settings you want to let traffic through the proxy specify http proxy 127.0.0.0:8118
To set up Tinyproxy, install it:
make auto
cd /usr/ports/www/tinyproxy/
make install clean
or
pkg install tinyproxy
Edit the configuration file
ee /usr/local/etc/tinyproxy.conf
Port 8888
Listen 127.0.0.1
If you don't set Listen, it will listen to all addresses.
To make all traffic go through Tor add a line or make it only through the Tor network, respectively:
upstream socks5 127.0.0.1:9050 or upstream socks5 127.0.0.1:9050 ".onion"
To work with I2P network we add the following, similarly to the example above:
upstream http 127.0.0.1:4444 or upstream http 127.0.0.1:4444 ".i2p"
In the settings of your application you specify http proxy 127.0.0.0:8888 in the traffic of which you want to let through the proxy server
And add to /etc/rc.conf a line depending on what kind of proxy you are using:
privoxy_enable="YES"
or
tinyproxy_enable="YES"
FreeBSD is so easy, and so much fun!