The Proxy Protocol from HAProxy

what is desired precisely is to know the other side's connection endpoints

It's not used for setup proxy connection.

Proxy Protocol Format

Human-readable header format (Version 1)

An example

PROXY TCP4 192.168.0.1 192.168.0.11 56324 443\r\n

And make it general

PROXY $protocol $source_ip $dst_ip $src_port $dst_port\r\n

Proxy Protocol in Nginx

TODO

X-Forwarded-For Header

TODO