3proxy install on Ubuntu AMI by Dmitri (
[email protected])
and unpack 3proxy mkdir 3proxy cd 3proxy wget http://3proxy.ru/current/3proxy0.7devel.tgz tar zxf 3proxy0.7devel100812103505.tgz
Compile and install it cd 3proxy0.7devel make f Makefile.Linux make f Makefile.Linux install
Create directories mkdir /usr/local/3proxy mkdir /usr/local/3proxy/logs mkdir /usr/local/3proxy/stat
Copy files and setup 3proxy to start at boot src/3proxy /usr/local/3proxy cfg/3proxy.cfg.sample /usr/local/3proxy/3proxy.cfg ./scripts/rc.d/proxy.sh /etc/init.d/3proxy chown R nobody:nogroup /usr/local/3proxy updaterc.d 3proxy defaults
Cleanup cd ~ rm rf 3proxy*
Configuration The file /usr/local/3proxy/3proxy.cfg should look like this one !/usr/local/3proxy/3proxy
# Use Google nameservers nserver 8.8.8.8 nserver 8.8.4.4 # nscache is good to save speed, traffic and bandwidth nscache 65536 # Here we can change timeout values timeouts 1 5 30 60 180 1800 15 60 s dmitri:CL:test123 # now we will not depend on any console (daemonize) daemon # log allows to specify log file location and rotation, D means logfile # is created daily log /var/log/3proxy.log D logformat "L%d%m%Y %H:%M:%S %z %N.%p %E %U %C:%c %R:%r %O %I %h %T" # We will keep last 30 log files rotate 30 # HTTP auth strong # We want to protect internal interface deny * * 127.0.0.1 # and llow HTTP and HTTPS traffic.
allow * * * 8088,80808088 HTTP allow * * * 443,8443 HTTPS allow * * * 21 FTP proxy n # SOCKS auth strong flush allow dmitri maxconn 20 socks # interface auth strong flush internal 0.0.0.0 allow dmitri * maxconn 3 p8888 counter /usr/local/3proxy/3proxy.3cf chroot /usr/local/3proxy setgid 65535 setuid 65535
For more details about configuration options check the template cfg/3proxy.cfg.sample The file /etc/init.d/3proxy should look like this one: #!/bin/sh # # chkconfig: 2345 20 80 # description: 3proxy tiny proxy server # case "$1" in start) echo Starting 3Proxy /usr/local/3proxy/3proxy /usr/local/3proxy/3proxy.cfg RETVAL=$? echo [ $RETVAL ] ;; stop) echo Stopping 3Proxy /usr/bin/killall 9 3proxy RETVAL=$? echo [ $RETVAL ] ;; *) echo Usage: $0 "{start|stop}" exit 1 esac exit 0
Launching and stopping Run from shell:
/etc/init.d/3proxy start /etc/init.d/3proxy stop
Browser setting http
:3128 socks
:1080 interface http://
:8888