I was curious if anyone had set up undertow to work with a layer-4 proxy server with undertow. I'm looking at using undertow behind an AWS ELB, but it's layer-7 load balancing logic kills any shot I have of taking advantage of undertow's awesome HTTP/2 & SPDY support.

ELB supports layer-4 load balancing, which would just multiplex inbound TCP connections (with an added bonus of offloading TLS), but I'm concerned about losing client IP addresses. ELB actually has a way to address this with HAProxy's PROXY protocol: http://www.haproxy.org/download/1.6/doc/proxy-protocol.txt

However, I haven't found a place for setting up the PROXY protocol support in undertow. Has anyone done this? Is there a way I should be going about it?

It feels like I'd just need to wrapper the existing Listener implementation with some kind of delegate that first parsed the PROXY header, extracted the client address/port/protocol/etc., and then passed on the rest of the logic to the HTTP2 handler. Is that about right?

--
Chris