dnsfallback
packageThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Overview¶
Package dnsfallback contains a DNS fallback mechanismfor starting up Tailscale when the system DNS is broken or otherwise unavailable.
The data is backed by a JSON file `dns-fallback-servers.json` that is updatedby `update-dns-fallbacks.go`:
(cd net/dnsfallback; go run update-dns-fallbacks.go)
Index¶
Constants¶
This section is empty.
Variables¶
This section is empty.
Functions¶
funcGetDERPMap¶added inv1.72.0
GetDERPMap returns a fallback DERP map that is always available, useful for basicbootstrapping purposes. The dynamically updated DERP map in LocalBackend shouldalways be preferred over this. Use this DERP map only when the control plane isunreachable or hasn't been reached yet. The DERP servers in the returned map alsorun a fallback DNS server.
funcMakeLookupFunc¶added inv1.40.0
func MakeLookupFunc(logflogger.Logf, netMon *netmon.Monitor) func(ctxcontext.Context, hoststring) ([]netip.Addr,error)
MakeLookupFunc creates a function that can be used to resolve hostnames(e.g. as a LookupIPFallback from dnscache.Resolver).The netMon parameter is optional; if non-nil it's used to do faster interface lookups.
funcSetCachePath¶added inv1.32.0
SetCachePath sets the path to the on-disk DERP map cache that we store andupdate. Additionally, if a file at this path exists, we load it and merge itwith the DERP map baked into the binary.
This function should be called before any calls to UpdateCache, as it is notconcurrency-safe.
Types¶
This section is empty.