Socks Proxy (Socket Secure) is a network protocol designed to allow clients to connect to servers over the Internet. It communicates via Transmission Control Protocol (TCP) or User Datagram Protocol (UDP), and supports authentication and traffic redirection.

Socks proxy can hide the client's real IP address and allow access to geo-restricted content. Usually, Socks proxy is widely used in circumventing the wall, online security and anonymous browsing.

static residential proxy Service Use legal static IP address provided by ISP. Residential proxy service providers let users choose from a pool of residential IPs so they can mask their real IP address for a long time. General application software account login, online investment transactions, etc.

How to build a Socks5 proxy server on CentOS7:

System: CentOS 7;

System firewall: iptables;

The system has configured the domestic yum source and epel source;

Socks5 proxy protocol is a network transmission protocol, which can realize the proxy of TCP and UDP. The advantage of using Socks5 proxy server is that it can hide the real IP address of the user, thereby protecting the privacy of the user. Building a Socks5 proxy server on CentOS7 requires the following steps:

1. Start the installation

SS5 Compilation and Deployment Document


# Install ss5 dependency package through yum
yum install -y gcc openldap-devel pam-devel openssl-devel # Download ss5 first wget http://jaist.dl.sourceforge.net/project/ss5/ss5/3.8.9-8/ss5-3.8.9-8.tar.gz # Unzip the ss5 installation package tar -vzx -f ss5-3.8.9-8.tar.gz # Go to the ss5 folder cd ss5-3.8.9/ # Compile after entering the directory ./configure make make install chmod a+x /etc/init.d/ss5

Returning this text means that the proxy has been opened

  telnet localhost 1080
                                
  Trying ::1...
  telnet: connect to address ::1: Connection refused
  Trying 127.0.0.1...
  Connected to localhost.
  Escape character is '^]'.
                                

Modify configuration file


vim /etc/opt/ss5/ss5.conf

Find the corresponding line and delete "#", and at the same time change " " to "u" in the authentication column at the end of the "auth" line, and change " " to "u" in the auth column in the "permit" line. Save after modification.


   #       SHost           SPort           Authentication
   #
   auth    0.0.0.0/0               -               u                              
                                

  #      Auth     SHost           SPort   DHost           DPort   Fixup   Group   Band    ExpDate
  #
  permit u        0.0.0.0/0       -       0.0.0.0/0       -       -       -       -       -
                                
                                

Set username and password

Format: user+space+password.

  vim /etc/opt/ss5/ss5.passwd                                
                                
  service ss5 restart
                                

Quick Deployment Document

1. Drag and drop the script file ss5.sh to the server

2. Add execution permission to the script and execute the script

  sudo chmod +x ss5.sh && ./ss5.sh && cd /etc/opt/ss5/                                           
                                        

3. Drag and drop the configuration file to /etc/opt/ss5/

  • ss5.conf
  • ss5.passwd

4. Start ss5 service

  service ss5 restart
                                

Summary

To build a Socks5 proxy server on CentOS7, you can use software such as dante or ss5. Among them, dante is more suitable for large-scale proxy, while ss5 is more lightweight and suitable for small proxy applications.

After the installation is complete, you need to add the corresponding user and password information in the configuration file, and make related port, IP and authentication settings. Then start the proxy server, open the corresponding port, and perform the corresponding proxy settings on the client browser to complete the proxy connection.

It is worth noting that in actual use, not only proxy delays and security issues must be considered, but also the usage rules of each platform must be followed to avoid unnecessary trouble or loss.