build_proxy_v2_header

Function build_proxy_v2_header 

Source
pub fn build_proxy_v2_header(
    client_addr: &SocketAddr,
    server_addr: &SocketAddr,
) -> Vec<u8> 
Expand description

Builds a PROXY protocol v2 header for TCP connections

§Arguments

  • client_addr - The original client’s socket address
  • server_addr - The server’s socket address (destination)

§Returns

A byte vector containing the complete PROXY v2 header