Configure 3proxy (HTTP) with SOCKS5 support

Configure HTTP 3proxy with SOCKS5 support.

INSTALL 3proxy:

# wget http://3proxy.ru/current/3proxy.tgz
# tar -xvzf 3proxy.tgz
# cd 3proxy
# make -f Makefile.Linux
# mkdir /usr/local/3proxy
# mkdir /usr/local/3proxy/logs
# mkdir /usr/local/3proxy/stat
# cp src/3proxy /usr/local/3proxy
# touch /usr/local/3proxy/3proxy.cfg
# chown -R nobody:nogroup /usr/local/3proxy

SETUP config:

vim /usr/local/3proxy/3proxy.cfg

# Run as daemon
daemon

# Max connections
maxconn 10024

# Dns settings
nserver 8.8.8.8
nserver 8.8.4.4
nscache 65535

#Users
users user1:CL:qwerty

# Logger dayly
log /usr/local/3proxy/logs/3proxy.log D
logformat “L%C – %U [%d/%o/%Y:%H:%M:%S %z] “”%T”” %E %I %O %N/%R:%r”
rotate 7

# IP bind
external 127.0.0.1
internal 127.0.0.1

# HTTP proxy
auth strong
allow user1
proxy -a -p9000

#SOCKS5 proxy
flush
auth strong
allow user1
socks -p9001

# Run proc as user nobody
setgid 65534
setuid 65534

user1 – it’s username
qwerty – it’s a your password for user user1 🙂

127.0.0.1 – replace it on your REAL SERVER PUBLIC IP!

Unit for systemd:

vim /etc/systemd/system/3proxy.service

[Unit]
Description=Fast and simple 3proxy
Wants=network-online.target
After=network-online.target

[Service]
Type=forking
WorkingDirectory=/usr/local/3proxy
ExecStart=/usr/local/3proxy/3proxy 3proxy.cfg
LimitNOFILE=64000
TimeoutStopSec=5
KillMode=mixed
RestartSec=60
Restart=always

[Install]
WantedBy=multi-user.target

systemctl daemon-reload
systemctl enable 3proxy.service
systemctl restart 3proxy.service

It’s all! Use FoxyProxy (or any other extension) extension.