Documentation ¶
Index ¶
- Variables
- type ConnPool
- type FallbackPool
- type Resolver
- type Server
- func (s *Server) GetConfig() *rpc.DNSConfig
- func (s *Server) Ready() <-chan struct{}
- func (s *Server) RequestCount() int
- func (s *Server) Run(c context.Context, initDone chan<- struct{}, listeners []net.PacketConn, ...) error
- func (s *Server) ServeDNS(w dns.ResponseWriter, r *dns.Msg)
- func (s *Server) SetClusterDNS(dns *manager.DNS, remoteIP net.IP)
- func (s *Server) SetExcludes(excludes []string)
- func (s *Server) SetMappings(mappings []*rpc.DNSMapping)
- func (s *Server) SetTopLevelDomainsAndSearchPath(ctx context.Context, domains []string, namespace string)
- func (s *Server) Stop()
- func (s *Server) Worker(c context.Context, dev vif.Device, configureDNS func(net.IP, *net.UDPAddr)) error
- Bugs
Constants ¶
This section is empty.
Variables ¶
var DefaultExcludeSuffixes = []string{
".com",
".io",
".net",
".org",
".ru",
}
Functions ¶
This section is empty.
Types ¶
type ConnPool ¶ added in v2.19.1
type ConnPool struct {
// contains filtered or unexported fields
}
func (*ConnPool) LocalAddrs ¶ added in v2.19.1
func (*ConnPool) RemoteAddr ¶ added in v2.19.1
type FallbackPool ¶ added in v2.5.4
type Server ¶
Server is a DNS server which implements the github.com/miekg/dns Handler interface.
func (*Server) RequestCount ¶
RequestCount returns the number of requests that this server has received.
func (*Server) Run ¶
func (s *Server) Run(c context.Context, initDone chan<- struct{}, listeners []net.PacketConn, fallbackPool FallbackPool, resolve Resolver) error
Run starts the DNS server(s) and waits for them to end.
func (*Server) ServeDNS ¶
func (s *Server) ServeDNS(w dns.ResponseWriter, r *dns.Msg)
ServeDNS is an implementation of github.com/miekg/dns Handler.ServeDNS.
func (*Server) SetClusterDNS ¶ added in v2.8.0
func (*Server) SetExcludes ¶ added in v2.14.0
SetExcludes sets the excludes list in the config.
func (*Server) SetMappings ¶ added in v2.14.0
func (s *Server) SetMappings(mappings []*rpc.DNSMapping)
SetMappings sets the Mappings list in the config.
func (*Server) SetTopLevelDomainsAndSearchPath ¶ added in v2.19.0
func (s *Server) SetTopLevelDomainsAndSearchPath(ctx context.Context, domains []string, namespace string)
SetTopLevelDomainsAndSearchPath updates the DNS top level domains and the search path used by the resolver.
func (*Server) Worker ¶
func (s *Server) Worker(c context.Context, dev vif.Device, configureDNS func(net.IP, *net.UDPAddr)) error
Worker places a file under the /etc/resolver directory so that it is picked up by the macOS resolver. The file is configured with a single nameserver that points to the local IP that the Telepresence DNS server listens to. The file is removed, and the DNS is flushed when the worker terminates
For more information about /etc/resolver files, please view the man pages available at
man 5 resolver
or, if not on a Mac, follow this link: https://www.manpagez.com/man/5/resolver/
Notes ¶
Bugs ¶
I have no idea why a lookup for localhost even makes it to here on my home WiFi when connecting to a k3sctl cluster (but not a kubernaut.io cluster). But it does, so I need this in order to be productive at home. We should really root-cause this, because it's weird.