Socks5 Proxy Configuration Guide in RedHat Environment

Source: Internet
Author: User

Recently, many netizens have been asking me how to use agents on QQ. In fact, it is very easy to find some socks5 agents through the Agent Hunter. I recently learned about linux, So I suddenly thought of using RedHat9 to create a socks5 proxy server. OK! Just do what you say.

1. First, search for the installation package of socks5on Peking University Skynet and find the latest version is socks5-v1.0r11.tar.gz. Then download it to my RH9 server.
  
2. Decompress the package
# Tar xvfz socks5-v1.0r11.tar.gz
3. Start Compilation
# Cd socks5-v1.0r11

#./Configure -- with-threads
# Make
# Make install
4. Create/etc/socks5.conf. In fact, there is a ready-made examples in the software package.
# Cd examples
# Cp socks5.conf. singlehomed/etc/socks5.conf (select the simplest configuration file)
The default configuration is
# A Socks5 Config file for a normal, single homed server
Permit ------
This configuration file allows anyone to use this socks5 proxy without verification.
  
If you want to restrict access to a specific IP segment (192.168.0.0/255.255.255.0), you can change it
Permit--192.168.0 .---
Or only one IP address (192.168.0.10) can be accessed and used.
Permit--192.168.0.10 ---
5. Run socks5-t to start the socks5 service, and then use QQ to test whether the agent is effective. Remember that the default port is 1080.
I tried it on FTP and QQ.
  
6. To stop socks5, just run stopsocks-KILL and socks5 will stop!
  
7. Use non-default port: If you want to disable the default listening port 1080 when the socks5 service is started, for example, 1234, run the following command:
Socks5-B 1234-t. Of course, if you disable this service, you must use the following command stopsocks-p 1234-KILL.
8. Configure socks5.conf in depth to enable socks5 to use the user authentication mechanism.
  
To use user authentication, you must first create the/etc/socks5.pwsswd File
  
The content is: (userA represents the user name. PasswdA indicates the userA password)
#/Etc/socks5.passwd
UserA passwdA
UserB passwdB
UserC passwdC
Then modify/etc/socks5.conf
Add the following statements
Auth-u
Or:
Auth---changed to auth--u
Add:
  
Change the default permit---to permit u-192.168.0 .---
  
Allow any user-authenticated connection from the 192.168.0.0/255.255.255.0 network segment
  
If you do not want to store the password file in the default/etc/socks5.passwd. To create a custom file, such as/etc/qq. passwd
  
Modify/etc/socks5.conf to add a parameter.
Set SOCKS5_PWDFILE/etc/qq. passwd
OK! Restart the service. If you do not enter the correct user name and password, you cannot use the socks5 Proxy Server. Enter the correct user name and password.
  
The preceding parameters can be used in combination. For example, you can restrict an IP segment to use the socks5 service and use the user name for verification.
  
In addition, there are some parameters for/etc/socks5.conf. Let's study them by yourself.
Set SOCKS5_BINDINFC 192.168.0.8: 1080
Ignore ident requests. When the client does not run identd, SOCKS5_NOIDENT will reduce the timeout value.
Set SOCKS5_NOIDENT
  
Specifies the maximum pause time of a connection. When the maximum value is exceeded, socks5 is disconnected.
Set SOCKS5_TIMEOUT 15
  
Socks5 will accept SOCKS V4 Protocol requests, which are not accepted by default
Set SOCKS5_V4SUPPORT
  
Specifies the maximum number of sub-processes simultaneously. The default value of Socks5 is 64.
Set SOCKS5_MAXCHILD 4

(End)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.