Self-taught Python: What is the significance of mastering the Socks5 proxy protocol?

The concept of SOCKS5?
A kind of use TCP/IP protocol to communicate between the front-end and the server to play an intermediary role, so that the front-end machine of the internal network can access the server of the Internet, making the communication more secure.

By forwarding the front-end request to the real target server, the SOCKS5 server simulates the front-end behavior.

In this case, the front end and SOCKS5 communicate through the TCP/IP protocol, the front end sends a request to the SOCKS5 server, and the SOCKS5 server sends a request to the actual server.

When the SOCKS5 server sends a communication request to the real server, there is no change in the request packet itself. After the SOCKS5 server receives the real server response, it also forwards it directly to the front end.

So the SOCKS5 protocol is a proxy protocol, which can be applied to various TCP/IP-based application layer protocols, and it is almost omnipotent. Although you can't understand the internal structure of the data that you forward, you can faithfully forward the communication packet and complete the functions that the protocol needs to complete.

Unlike the SOCKS5 protocol, the HTTP agent is implemented through the HTTP protocol. The HTTP proxy server software understands the internal structure of the communication packet, and it also needs to modify and convert the communication packet program during the forwarding process. Unlike the HTTP proxy protocol, SOCKS5 is actually a transport layer proxy protocol.

If each specific application layer protocol must design a corresponding proxy protocol representation, then it is conceivable that a specific proxy server cannot support so many new protocols. It can be said that the emergence of SOCKS5 alleviates the special needs of different protocols for proxy protocols.

Guess you like

Origin blog.csdn.net/zhimaHTTP/article/details/115251762