getlantern / tlsmasq

A library for servers which masquerade as other TLS servers
Apache License 2.0
2 stars 1 forks source link

Implement netx.WrappedConn interface #42

Closed oxtoacart closed 1 year ago

oxtoacart commented 1 year ago

This allows http-proxy-lantern to get at the underlying tcp connection.

oxtoacart commented 1 year ago

If the proxy (and the client) are creating the TCP connections, they should be able to hang on to them and track BBR metrics directly, without the need to peer under the hood in each protocol library to ask for the TCP connection back. But I understand that this is long-standing practice.

Yeah, it's not my favorite either. In this particular case, we could solve the problem by eliminating the WrapListener API and replacing it with a ServerConn() api like this one. That doesn't work for all transports unfortunately, so it's not clear to me if we can completely get away from this pattern.

oxtoacart commented 1 year ago

Thanks @hwh33 !