SOCKS5 is a proxy protocol that simulates the behavior of a front-end by forwarding a request from the front-end to a real target server. Here, the front-end and SOCKS5 also communicate through the TCP/IP protocol, the front-end to send the original to the real server to the SOCKS5 server, and then SOCKS5 the server to forward the request to the real server.
Below we will use SS5 to build a Socks5 Proxy Server on Linux, the following process:
First, you need to install some dependent components before compiling the installation SS5
Yum-y install gcc gcc-c++ automake make pam-devel openldap-devel cyrus-sasl-devel
Next, we download SS5 the latest version of the source code from http://ss5.sourceforge.net/and start compiling the installation:
Tar zxvf./ss5-3.8.9-8.tar.gz
CD ss5-3.8.9
./configure
Make
Make install
Let SS5 start with the system
chmod +X/ETC/INIT.D/SS5
Chkconfig--add SS5
Chkconfig--level 345 SS5 on
Open User name password authentication mechanism
Vi/etc/opt/ss5/ss5.conf
Find the Auth and permit lines in ss5.conf and modify them in the following format
Auth 0.0.0.0/0-U
Permit U 0.0.0.0/0-0.0.0.0/0----
Set user name and password
vi/etc/opt/ss5/ss5.passwd
One-line account with a space between the username and password, for example:
User1 123
User2 234
Set port
Vi/etc/sysconfig/ss5
In/etc/sysconfig/ss5 this file, add the following line of command, and the parameters after-B represent the IP address and port number of the listener
# ADD startup option here
Ss5_opts= "-U root-b 0.0.0.0:8080"
Start
Service SS5 Start