Movatterモバイル変換


[0]ホーム

URL:


dnsfallback

package
v1.92.3Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2025 License:BSD-3-ClauseImports:22Imported by:18

Details

Repository

github.com/tailscale/tailscale

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

funcGetDERPMapadded inv1.72.0

func GetDERPMap() *tailcfg.DERPMap

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.

funcMakeLookupFuncadded 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.

funcSetCachePathadded inv1.32.0

func SetCachePath(pathstring, logflogger.Logf)

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.

funcUpdateCacheadded inv1.32.0

func UpdateCache(c *tailcfg.DERPMap, logflogger.Logf)

UpdateCache stores the DERP map cache back to disk.

The caller must not mutate 'c' after calling this function.

Types

This section is empty.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp