tencent cloud



Last updated: 2023-06-29 15:37:55
    This document describes how to obtain real client IPs through Proxy Protocol V1/V2 when you enable the L4 proxy acceleration.


    When the datagrams are accelerated through L4 acceleration connection, you can pass the real client IPs and Ports to the origin server through Proxy Protocol V1/V2. For introduction on the protocol, see Proxy Protocol V1/V2.
    The origin can parse and obtain real client IPs with two methods based on the scenarios and deployment modes.
    Method 1: If the TCP protocol is used on the origin, it is recommended to add a Nginx server that supports Proxy Protocol V1/V2 in front of the application server. For details, see Obtaining Real Client IPs Through Nginx.
    Method 2: If the UDP protocol is used on the origin, or if you want to directly parse the real client IPs under the TCP protocol on the application server, you can parse the Proxy Protocol field on the application server by referring to the sample code in the Proxy Protocol. For details, see Parsing Real Client IPs on Application Server.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support