Use the Proxy Protocol to Preserve a Client’s IP Address

In this blog post, you’ll learn how the Proxy Protocol preserves a client’s IP address when that client’s connection passes through a proxy. You will also find resources for how to integrate the protocol into your own proxy or web server software.To get more news about ip change, you can visit pyproxy.com official website.

What is the Proxy Protocol? It is a network protocol for preserving a client’s IP address when the client’s TCP connection passes through a proxy. Without such a mechanism, proxies lose this information because they act as a surrogate for the client, relaying messages to the server but replacing the client’s IP address with their own. This distorts the logs of upstream servers because the logs incorrectly indicate that all traffic originated at the proxy.
72dc21f8d293c9fc792d54b13b47ff92.jpg
Some higher-level protocols, such as HTTP, have a solution for this. With HTTP, a proxy can add a Forwarded HTTP header, or the non-standard X-Forwarded-For header, to store the client’s original IP address so that the server can retrieve it, but other protocols lack a similar fix. The Proxy Protocol, which operates beneath at the TCP layer, fills this gap, expanding coverage to any upper layer protocol—SMTP, IMAP, FTP, the Minecraft protocol, proprietary database protocols, etc.—that transmits messages over TCP/IP. The caveat is that both the proxy and the server on the receiving end must support it.