> preserving the client ip back to the backing service involves a terrible hack called Proxy Protocol
No need for that, there's an IRC extension to indicate the source IP to the backend: https://ircv3.net/specs/extensions/webirc
It's supported by all the major IRCd implementations these days.
Terrible hacky custom extensions like this is precisely why I just want to talk to it via HTTP.
How is this more hacky than X-Forwarded-For + X-Forwarded-Host + X-Forwarded-Proto?
Re:IRCv3
by Karrot_Kream on Wednesday May 19, 2021 @04:42PM
(#27214208)
Indeed, and it's because TCP is not meant to deal with that sort of proxy-ing and framing. HTTP is specifically an L7 protocol and that makes it a good spot to do things like framing and signalling (through headers and such).
Is proxy protocol really a terrible hack? (Ok the part where it expects the header to be in a single packet and have no other data kind of is, but that usually works out ok) It's a way to pass some meta data at the beginning of the session and you can configure it.
Alternatively, if your proxy and origin are on the same ethernet broadcast domain, you could just change the destination ethernet address and resend the packet as-is, or stick it in an IPIP tunnel.
https://www.haproxy.com/blog/haproxy/proxy-protocol/
It's messy. The tooling around TLS and reverse proxying for HTTP is much more common and easy.