Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] ProxyConnectionFactory Custom TLVs

Hi,

On Mon, Feb 3, 2020 at 4:25 PM Josh Spiegel <joshlakewg@xxxxxxxxx> wrote:
>
>
> Hi,
>
> In version 2 of the proxy protocol, it allows for application-specific TLV types:
> https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt
>
> See section 2.2.7.  Basically the type code in range  0xE0..0xEF gets associated with an arbitrary block of bytes.
>
> Currently it appears these custom TLVs are being ignored:
> https://github.com/eclipse/jetty.project/blob/jetty-10.0.x/jetty-server/src/main/java/org/eclipse/jetty/server/ProxyConnectionFactory.java#L545
>
> I think ideally these custom TLVs should be accessible by the underlying connection.  For example, proxyEndPoint could simply maintain a map from type -> byte[].  e.g.
>
>   default:
>       proxyEndPoint.setCustom(type, value);
>
> Or perhaps it could even reuse setAttribute() for this if it treats the type code as a string.
>
> Does this make sense?  Is there any appetite for this change?

Yes, please file an issue about this.
FYI Jetty's HttpClient allows to send the TLVs, but yes on the server
they are ignored (apart maybe one, the TLS version)

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top