You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/net
Andrea Gottardo 6de6ab015f
net/dns: tweak DoH timeout, limit MaxConnsPerHost, require TLS 1.3 (#13564)
Updates tailscale/tailscale#6148

This is the result of some observations we made today with @raggi. The DNS over HTTPS client currently doesn't cap the number of connections it uses, either in-use or idle. A burst of DNS queries will open multiple connections. Idle connections remain open for 30 seconds (this interval is defined in the dohTransportTimeout constant). For DoH providers like NextDNS which send keep-alives, this means the cellular modem will remain up more than expected to send ACKs if any keep-alives are received while a connection remains idle during those 30 seconds. We can set the IdleConnTimeout to 10 seconds to ensure an idle connection is terminated if no other DNS queries come in after 10 seconds. Additionally, we can cap the number of connections to 1. This ensures that at all times there is only one open DoH connection, either active or idle. If idle, it will be terminated within 10 seconds from the last query.

We also observed all the DoH providers we support are capable of TLS 1.3. We can force this TLS version to reduce the number of packets sent/received each time a TLS connection is established.

Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
2 months ago
..
art
captivedetection net/captivedetection: set Timeout on net.Dialer (#13613) 2 months ago
connstats
dns net/dns: tweak DoH timeout, limit MaxConnsPerHost, require TLS 1.3 (#13564) 2 months ago
dnscache net/dnscache: don't fall back to an IPv6 dial if we don't have IPv6 2 months ago
dnsfallback
flowtrack
ipset
ktimeout
memnet
netaddr
netcheck net/netcheck,wgengine/magicsock: plumb OnlyTCP443 controlknob through netcheck (#13491) 2 months ago
neterror
netkernelconf
netknob
netmon
netns
netstat
netutil {ipn,net,tsnet}: use tsaddr helpers 2 months ago
packet wgengine/magicsock: actually use AF_PACKET socket for raw disco 3 months ago
ping
portmapper net/portmapper: don't treat 0.0.0.0 as a valid IP 2 months ago
proxymux
routetable
socks5
sockstats
speedtest
stun
stunserver
tcpinfo
tlsdial
tsaddr net/tsaddr: add WithoutExitRoutes and IsExitRoute 2 months ago
tsdial
tshttpproxy
tstun util/usermetrics: make usermetrics non-global 2 months ago
wsconn