Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OSConfig ¶
type OSConfig struct { // Hosts is a map of DNS FQDNs to their IPs, which should be added to the // OS's hosts file. Currently, (2022-08-12) it is only populated for Windows // in SplitDNS mode and with Smart Name Resolution turned on. Hosts []*HostEntry // Nameservers are the IP addresses of the nameservers to use. Nameservers []netip.Addr // SearchDomains are the domain suffixes to use when expanding // single-label name queries. SearchDomains is additive to // whatever non-Tailscale search domains the OS has. SearchDomains []dnsname.FQDN // MatchDomains are the DNS suffixes for which Nameservers should // be used. If empty, Nameservers is installed as the "primary" resolver. MatchDomains []dnsname.FQDN }
OSConfig is an OS DNS configuration.
type OSConfigurator ¶
type OSConfigurator interface { // SetDNS updates the OS's DNS configuration to match cfg. // If cfg is the zero value, all ctrld-related DNS // configuration is removed. // SetDNS must not be called after Close. // SetDNS takes ownership of cfg. SetDNS(cfg OSConfig) error // Close removes ctrld-related DNS configuration from the OS. Close() error Mode() string }
An OSConfigurator applies DNS settings to the operating system.
func NewOSConfigurator ¶
func NewOSConfigurator(logf logger.Logf, interfaceName string) (ret OSConfigurator, err error)
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package resolvconffile parses & serializes /etc/resolv.conf-style files.
|
Package resolvconffile parses & serializes /etc/resolv.conf-style files. |
Click to show internal directories.
Click to hide internal directories.