Brad Fitzpatrick
9df4185c94
control/controlclient, net/{dnscache,dnsfallback}: add DNS fallback mechanism
...
Updates #1405
Updates #1403
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-03-01 18:42:03 -08:00
Brad Fitzpatrick
66be052a70
net/dnscache: work on IPv6-only hosts (again)
...
This fixes the regression where we had stopped working on IPv6-only
hosts.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2021-01-06 19:53:13 -08:00
Brad Fitzpatrick
a2d78b4d3e
net/dnscache, control/controlclient: use DNS cache when dialing control
...
Cache DNS results of earlier login.tailscale.com control dials, and use
them for future dials if DNS is slow or broken.
Fixes various issues with trickier setups with the domain's DNS server
behind a subnet router.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2020-11-11 12:50:04 -08:00
Brad Fitzpatrick
19b0cfe89e
all: prepare for GOOS=ios in Go 1.16
...
Work with either way for now on iOS (darwin/arm64 vs ios/arm64).
In February when Go 1.16 comes out we'll have a universal binary for
darwin/arm64 (macOS) and will drop support for Go 1.15 and its
darwin/amd64 meaning iOS. (it'll mean macOS).
Context:
* https://tip.golang.org/doc/go1.16#darwin
* https://github.com/golang/go/issues/38485
* https://github.com/golang/go/issues/42100
2020-11-11 09:17:04 -08:00
David Anderson
657f331e8b
net/dnscache: remove unnecessary lint warning.
2020-04-30 20:31:44 -07:00
Elias Naur
ad0795efc2
net/dnscache: don't use the Go resolver on Android
...
The local resolver is not available for apps on Android.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-04-27 12:04:39 -07:00
Brad Fitzpatrick
bd0e20f351
net/dnscache: ignore annoying staticcheck check
2020-03-09 22:12:22 -07:00
Brad Fitzpatrick
d44325295e
net/dnscache: initialize the single Resolver more directly
2020-03-09 21:05:01 -07:00
David Crawshaw
cac68fe102
net/dnscache: do not PreferGo on macOS/iOS
...
With this commit my iPhone can now DERP.
2020-03-09 14:20:09 -04:00
Brad Fitzpatrick
8f0fd01efd
net/dnscache: add copyright header to test
2020-03-09 11:07:31 -07:00
David Crawshaw
5a1ce4adae
net/dnscache: parse passed CIDR
...
Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
2020-03-09 13:11:35 -04:00
Brad Fitzpatrick
2cff9016e4
net/dnscache: add overly simplistic DNS cache package for selective use
...
I started to write a full DNS caching resolver and I realized it was
overkill and wouldn't work on Windows even in Go 1.14 yet, so I'm
doing this tiny one instead for now, just for all our netcheck STUN
derp lookups, and connections to DERP servers. (This will be caching a
exactly 8 DNS entries, all ours.)
Fixes #145 (can be better later, of course)
2020-03-05 12:23:37 -08:00