Compile tinyproxy as anonymous proxy

Tinyproxy is a small light-weight proxy daemon for Linux environments. Espescially usefull if you have some spare dedicated/virtual servers running with multiple IPs. In this tutorial I will show you how to compile it from source on a Debian server – as the current official .deb package does not allow running it in complete anonymous mode.

Additionally if you don’t want to install asciidoc (1GB!!!) you can use the modified patch from my compile steps (original). My version of the patch works with the current stable (1.8.3) version of tinyproxy. Not using the patch might give you following error:

checking for a2x... no
configure: error: Test for asciidoc failed. See the file 'INSTALL' for help.
Compile
$ wget --no-check-certificate https://banu.com/pub/tinyproxy/1.8/tinyproxy-1.8.3.tar.bz2
$ wget --no-check-certificate https://github.com/lifeofguenter/patches/raw/master/tinyproxy/tinyproxy-1.8.3-no-asciidoc.patch
$ tar xvfj tinyproxy-1.8.3.tar.bz2
$ cd tinyproxy-1.8.3/
$ patch -p1 < ../tinyproxy-1.8.3-no-asciidoc.patch 
$ ./configure 
--prefix=/usr 
--sysconfdir=/etc 
--localstatedir=/var 
--disable-xtinyproxy 
--disable-filter 
--disable-upstream 
--disable-reverse 
--enable-transparent
$ make && sudo make install
Config
$ sudo nano /etc/tinyproxy.conf
User nobody
Group nogroup

Port 8888
BindSame yes
Timeout 600
DefaultErrorFile "/usr/share/tinyproxy/default.html" 
StatFile "/usr/share/tinyproxy/stats.html" 
Syslog On
LogLevel Error
PidFile "/var/run/tinyproxy/tinyproxy.pid" 
MaxClients 100
MinSpareServers 5
MaxSpareServers 20
StartServers 10
MaxRequestsPerChild 10000
Allow 127.0.0.1
DisableViaHeader Yes
ConnectPort 443
ConnectPort 563
Run
$ sudo mkdir /var/run/tinyproxy
$ sudo chown nobody:nogroup /var/run/tinyproxy/
$ sudo tinyproxy

Leave a Reply

Your email address will not be published. Required fields are marked *