Proxy Protocol V1/V2 获取的客户端真实 IP 格式
Proxy Protocol V1
Proxy Protocol V1 协议仅支持 TCPv4、TCPv6 协议,并采用字符串格式。其格式如下:


PROXY TCP4 192.168.0.1 192.168.0.11 56324 443\r\n
通过使用 Wireshark 抓包工具,可以查看到以下信息:


Proxy Protocol V2
Proxy Protocol V2 协议采用二进制格式,支持 TCPv4、TCPv6、UDPv4、UDPv6 协议,其格式如下:
IPv4格式


IPv6格式

