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 all: fix new lint warnings from bumping staticcheck 3 months ago
captivedetection net/captivedetection: set Timeout on net.Dialer (#13613) 2 months ago
connstats all: use Go 1.22 range-over-int 7 months ago
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 {control,net}: close idle connections of custom transports 4 months ago
flowtrack net/flowtrack: fix, test String method 5 months ago
ipset go.mod: bump bart 5 months ago
ktimeout net/ktimeout: add a package to set TCP user timeout 9 months ago
memnet net/memnet: export the network name (#9111) 1 year ago
netaddr all: update copyright and license headers 2 years ago
netcheck net/netcheck,wgengine/magicsock: plumb OnlyTCP443 controlknob through netcheck (#13491) 2 months ago
neterror net/neterror, wgengine/magicsock: use UDP GSO and GRO on Linux (#7791) 2 years ago
netkernelconf ipn/{ipnlocal,localapi},net/netkernelconf,client/tailscale,cmd/containerboot: optionally enable UDP GRO forwarding for containers (#12410) 5 months ago
netknob all: update copyright and license headers 2 years ago
netmon all: fix new lint warnings from bumping staticcheck 3 months ago
netns net/netns: remove some logspam by avoiding logging parse errors due to unspecified addresses 4 months ago
netstat all: add test for package comments, fix, add comments as needed 4 months ago
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 net/ping: fix ICMP echo code field to 0 1 year ago
portmapper net/portmapper: don't treat 0.0.0.0 as a valid IP 2 months ago
proxymux all: cleanup unused code, part 1 (#10661) 11 months ago
routetable net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 7 months ago
socks5 net/socks5: support UDP 4 months ago
sockstats net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 7 months ago
speedtest all: update copyright and license headers 2 years ago
stun ci: enable checklocks workflow for specific packages 5 months ago
stunserver all: use Go 1.22 range-over-int 7 months ago
tcpinfo all: use Go 1.22 range-over-int 7 months ago
tlsdial cmd/tta, vnet: add host firewall, env var support, more tests 3 months ago
tsaddr net/tsaddr: add WithoutExitRoutes and IsExitRoute 2 months ago
tsdial {control,net}: close idle connections of custom transports 4 months ago
tshttpproxy all: use Go 1.22 range-over-int 7 months ago
tstun util/usermetrics: make usermetrics non-global 2 months ago
wsconn go.{mod,sum}: migrate from nhooyr.io/websocket to github.com/coder/websocket 3 months ago