vert.x
vert.x copied to clipboard
Access TLVs of Proxy Protocol v2 header from NetSocket
Describe the feature
Ability to read TLVs of Proxy Protocol header from NetSocket. To be more clear, in HAProxyMessageCompletionHandler#decode function, we only use HAProxyMessage msg only for overriding remote address and local address, however, in some use case, there are information in the proxy protocol header that are store in List<HAProxyTLV> tlvs of msg that are needed. Currently there is not a way to access that data when enabling proxy protocol in NetServerOptions of NetServer
I see, you could like to access those info from the NetSocket ?
I see, you could like to access those info from the NetSocket ?
Yes, NetSocket is created from NetServer (in #connectHandler), when NetServer is init with proxy protocol enabled then there should be a way to access proxy protocol data, the current way of getting only remote/local address isn't sufficient for all use cases. Thanks
so in practice a map would be sufficient
so in practice a map would be sufficient
Not sure if I fully understand this, TLVs are represented as a list in HAProxyMessage (of netty), could you explain more how the map works here? Thanks.
I meant a Java map to expose this in API
I meant a Java map to expose this in API
That'd work, thanks 👍