From: "Omar Polo" Subject: Re: relayd: PROXY: use client source port to unbreak forwarding To: Klemens Nanni Cc: OpenBSD tech , Christoph Liebender Date: Tue, 10 Nov 2026 18:05:57 +0100 Klemens Nanni wrote: > https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt > 2.1. Human-readable header format (Version 1) > > A valid v1 header from 2001:db8::1/1234 to example.com/80 would be > > PROXY TCP6 2001:db8::1 2606:4700:10::6814:179a 1234 80 > > > With pf diverting such connections > > pass ... divert-to ::1 port 3127 > > for relayd to proxy them > > relay proxy { > listen on ::1 port 3127 > forward to ... port 3128 proxy-protocol v1 > } > # HAProxy equivalent > #frontend proxy > # bind [::1]:3127 > # use_backend remote > #backend remote > # server srv ...:3128 send-proxy #-v2 > > the PROXY v1 header produced by relayd contains the remote proxy port > instead of the client's source port, i.e. > > PROXY TCP6 2001:db8::1 2606:4700:10::6814:179a 1234 3128 > > > Send the client port to unbreak PROXY forwarding. > I have tested both v1 and v2 against HAProxy as remote: > > listen proxy > bind [::]:3128 accept-proxy > use_backend self > backend self > server def [::] > > > Feedback? OK? okay op@