mholt / caddy-l4

Layer 4 (TCP/UDP) app for Caddy
Apache License 2.0
922 stars 69 forks source link

Qn: Socks5 TCP Proxy with header and TLS #170

Closed marty9x9 closed 9 months ago

marty9x9 commented 9 months ago

This looks amazing. I'm still new to Caddy. Is it possible to do the following?

App unsecure (like JDBC driver) -> caddyl4 Socks5 TCP -> custom PPV2 header before upgrade to TLS -> Secure endpoint

mholt commented 9 months ago

Hmm, I think only SOCKS 5 termination is implemented currently, but it should be quite doable to implement a SOCKS 5 client.

marty9x9 commented 9 months ago

What about sending custom PPV2 header before TLS negotiation?

mholt commented 9 months ago

I don't know what PPV2 is.

francislavoie commented 9 months ago

I think you mean PROXY Protocol v2? Then yes layer4.handlers.proxy supports sending PROXY Protocol bytes ahead of the connection.