Closed candrews closed 4 years ago
For reference, the browser support claim doesn't seem true from what I can see; https://github.com/curl/curl/issues/3662
Indeed, that was news to me too (I opened that issue in curl too) :)
getdns (the underlying library for stubby) was actually an early implementor of TFO...!
A quick peruse of the getdns source code/compile time options would show on the client side:
It isn't currently implemented in the server code but that is normally listening to a system library which wouldn't use TCP by default but it should be there for completeness.
I clearly didn't check the getdns library - Thank you very much for pointing all of this out! :)
Would it be helpful for me to open an issue in getdns for your last point?
It isn't currently implemented in the server code but that is normally listening to a system library which wouldn't use TCP by default but it should be there for completeness.
@wtoorop @candrews Just played with the 'Transfer issue' beta feature in GitHub to move this to the getdns repo.... :-)
Is TFO only available with GETDNS_TRANSPORT_TCP ? I can't see any TFO flag when I set it to GETDNS_TRANSPORT_TLS.
I see. Unbound TFO implement only support for tcp not tls. And openssl library doesn't looks like supporting TFO yet.
So I tried to compile with gnutls in develop branch but it required gnutls-dane. gnutls-dane requires libunbound and unbound require libopenssl.
Huh..?
@odkrys I'm about to do a commit using TCP_FASTOPEN_CONNECT option, which will do TFO for TLS on Linux (I tested 8.8.8.8 and it seems to work). And yes the circular dependencies are a bit crazy... Also, even if you compile getdns with GnuTLS, we still need OpenSSL for Zero configuration DNSSEC, because of the S/MIME verification of trust-anchors.xml which we cannot do with GnuTLS (yet).
sadly, it needs kernel 4.11+...
Fixed in 5.2.2
TCP Fast Open eliminates a round trip for TCP connections. Since stubby is performance sensitive and makes many TCP connections to the DNS-over-TLS server, using TCP Fast Open would be a nice improvement. See https://lwn.net/Articles/508865/ for background.
On the client side, it's as simple as setting the
TCP_FASTOPEN_CONNECT
option on the socket.On the server side, stubby would do something like this on the listening socket:
Chrome and Firefox have supported TCP Fast Open for clients for over a year, and other DNS servers (ex unbound) use it for client and sever connections too.