5 ms·
You can. What you do is take the Client Hello packet, and inspect the public SNI field. This will show you the destination to proxy to. Your forward to that ser
by Fischgericht 5d ago
You can. What you do is take the Client Hello packet, and inspect the public SNI field. This will show you the destination to proxy to. Your forward to that server, and that server then completes the handshake.
No matter if you are using TLS over TCP (or HTTPS) or DTLS - end-to-end-encryption can be kept up simply by proxying on the first step of the Handshake.
That is the correct way how to do it.
- ranger_danger 5d agoI should have clarified... when I said "proxy TLS" I meant while retaining the typical features that reverse proxy providers offer like those I mentioned here: https://news.ycombinator.com/item?id=49662319 https://news.ycombinator.com/item?id=49662319 If for example Cloudflare decided to offer this SNI-based TLS passthrough, they could no longer give you adequate DDoS protection, caching, analytics etc.
- Fischgericht 5d agoI disagree. What you do (well, and what I do in my code) is this: You cache the original IP packets containing the Client Hello. You inspect those packets. And you make your DDoS protection etc based on this. And if you decide the packet is OK forwarding, only then you replay the original IP packets to the destination. I know that you can not inspect content this way. But there simply are situations where content SHOULD NOT be inspected.
- ranger_danger 4d agoI certainly would not call that adequate, especially for someone like Cloudflare with their scale, and with what their customers expect. What you describe may be technically possible in a very narrow sense, for only specific types of DDoS attacks, but I don't see it being practical in most cases, plus I think ECH would make this difficult to do properly.