Contents
1. Proxy IP type:
Usually we generally divide the proxy IP into four types, “transparent proxy, anonymous proxy, high-hiding proxy, obfuscated proxy”, proxy IP, in terms of security, the order of these
four proxy types Divided into “high” – “anonymous” – “transparent”
2. The principle of agency
The type of agent depends mainly on the configuration of the proxy server. Different configurations form different agent types.
ADVERTISEMENT
In the configuration, these three variables REMOTE_ADDR, HTTP_VIA, HTTP_X_FORWARDED_FOR are decisive factors.
- REMOTE_ADDR
- REMOTE_ADDR represents the client’s IP, but its value is not provided by the client, but the server is specified according to the client’s IP.
- If you use a browser to directly access a website, the website’s web server (Nginx, Apache, etc.) will set REMOTE_ADDR to the client’s IP address.
- If we set up a proxy for the browser, our request to access the target site will go through the proxy server, and then the proxy server will translate the request to the target site. Then the web server of the website will set REMOTE_ADDR to the IP of the proxy server.
- X-Forwarded-For(XFF)
- X-Forwarded-For is an HTTP extension header that represents the real IP of the HTTP requester. When the client uses the proxy, the web server does not know the real IP address of the client. To avoid this, the proxy server usually adds an X-Forwarded-For header to add the client’s IP to the header.
- The X-Forwarded-For request header format is as follows:
- X-Forwarded-For: client, proxy1, proxy2
client represents the IP address of the client; proxy1 is the IP of the device farthest from the server; proxy2 is the IP of the secondary proxy device; from the format, it can be seen that from client to server Can have multiple layers of agents. - If an HTTP request arrives at the server and passes through three agents Proxy1, Proxy2, and Proxy3, the IP addresses are IP1, IP2, and IP3, and the real IP of the user is IP0. Then, according to the XFF standard, the server will eventually receive the following information:
- X-Forwarded-For: IP0, IP1, IP2
Proxy3 Directly connect to the server, it will append IP2 to XFF, indicating that it is forwarding requests to Proxy2. There is no IP3 in the list, and IP3 can be obtained on the server through the Remote Address field. We know that HTTP connections are based on TCP connections, there is no concept of IP in the HTTP protocol, and Remote Address comes from a TCP connection, indicating the IP of the device that establishes a TCP connection with the server, in this case IP3.
- X-Forwarded-For: client, proxy1, proxy2
- HTTP_VIA: Via is a header in the HTTP protocol. It records the proxy and gateway through which an HTTP request passes. After one proxy server, it adds a proxy server information, and adds two after two.
3. The difference between the types of agents
- Transparent Proxy
- The configuration of the proxy server is as follows:
- REMOTE_ADDR = Proxy IP
- HTTP_VIA = Proxy IP
- HTTP_X_FORWARDED_FOR = Your IP
- Although the transparent proxy can directly “hide” the client’s IP address, the client’s IP address can still be found from HTTP_X_FORWARDED_FOR.
- The configuration of the proxy server is as follows:
- Anonymous Proxy
- The configuration of the proxy server is as follows:
- REMOTE_ADDR = proxy IP
- HTTP_VIA = proxy IP
- HTTP_X_FORWARDED_FOR = proxy IP
- Anonymous agents provide the ability to hide client IP addresses. With an anonymous proxy, the server knows that the client is using the proxy and cannot know the real IP address of the client.
- Distorting Proxy
- The configuration of the proxy server is as follows:
- REMOTE_ADDR = Proxy IP
- HTTP_VIA = Proxy IP
- HTTP_X_FORWARDED_FOR = Random IP address
- Similar to the principle of an anonymous proxy, but it will pretend to be more realistic. If the client uses a confusing proxy, the server still knows that the client is using the proxy, but will get a fake client IP address.
- High-altitude agent (Elite Proxy or High Anonymity Proxy)
- The configuration of the proxy server is as follows:
- REMOTE_ADDR = Proxy IP
- HTTP_VIA = not determined
- HTTP_X_FORWARDED_FOR = not determined
The Cheat Agent can make the server unclear whether the client is using the proxy or not, and the server can not get the real IP address of the client.
Discussion about this post