The instruction suitable for all Unix distributions, because we are gonna compile it from source code. Compiling from source code is preferred, that way we will get the latest version. In this case I’m using Ubuntu/Debian.
To compile 3proxy from source code you need to install git, make, and gcc. Just type into your terminal:
apt-get install gcc make git -y
Next, browse to home directory
cd ~
git clone https://github.com/z3APA3A/3proxy.git
This will download latest version of 3proxy to your machine. Next step to compile and setup:
cd 3proxy
make -f Makefile.Linux
Now we put files into correct path and setup auto start of the service
mkdir -p /usr/local/etc/3proxy/bin
cp src/3proxy /usr/local/etc/3proxy/bin
cp ./scripts/rc.d/proxy.sh /etc/init.d/3proxy
Before we add 3proxy service to autostart, we need to do some adjustment to the default init script because it’s missing some LSB tags or else you’ll get some insserv warning.
vi /etc/init.d/3proxy
Change all the lines started with “#” with these lines:
#!/bin/sh
### BEGIN INIT INFO
# Provides: 3proxy
# Required-Start: $network $remote_fs $local_fs
# Required-Stop: $network $remote_fs $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Stop/start 3proxy
### END INIT INFO
Make the service auto start on boot
update-rc.d 3proxy defaults
Now let’s create the config file.
vi /usr/local/etc/3proxy/3proxy.cfg
You can RTFM for all the parameters or options, but to make it short, these are my config for anonymous proxy:
daemon
nserver 208.67.222.222
nscache 65536
timeouts 1 5 30 60 180 1800 15 60
log /var/log/3proxy.log D
logformat "- +_L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T"
archiver gz /usr/bin/gzip %F
rotate 1
authcache user 60
auth none
deny * * 127.0.0.1,192.168.1.1
allow * * * 1-65535 HTTP
allow * * * 1-65535 HTTPS
proxy -p5555 -n -a
#Enable admin web-ui on specified port
#admin -p6666
As you can see from above example, I’m using 208.67.222.222 as my DNS server, and the proxy service listen on port 5555. Change it to whatever you like, there are a lot of proxy scanner on the internet so be careful.
To start/stop the proxy:
/etc/init.d/3proxy start
or
/etc/init.d/3proxy stop
Enjoy.
Leave a Reply