Documentation
¶
Overview ¶
package dnsresolver
Index ¶
- Variables
- func CacheAll(hostname string)
- func Lookup(hostname string, rType uint16) ([]string, error)
- func LookupIP(hostname string) ([]netip.Addr, error)
- func LookupIP4(hostname string) ([]netip.Addr, error)
- func LookupIP6(hostname string) ([]netip.Addr, error)
- func ReverseLookupIP4(ip4 string) (string, error)
- func ReverseLookupIP4Addr(ip4Addr netip.Addr) (string, error)
- type Answer
- type Resolver
- func (r *Resolver) Exchange(query string, raw, summary bool, rTypes []uint16) (*Answer, error)
- func (r *Resolver) IsFunctional() error
- func (r *Resolver) IsReachable() bool
- func (r *Resolver) Lookup(query string, rType uint16) ([]string, error)
- func (r *Resolver) LookupAddr(query string, rType uint16) ([]netip.Addr, error)
- func (r *Resolver) LookupAddrs(query string, rTypes []uint16) ([]netip.Addr, error)
- func (r *Resolver) ReverseLookupIP4(ip4 string) (string, error)
- func (r *Resolver) ReverseLookupIP4Addr(addrIP4 netip.Addr) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var TypeAll []uint16 = rTypeAll()
TypeAll holds all DNS Types (A, AAA, CNAME, MX ...)
Functions ¶
Types ¶
type Resolver ¶
type Resolver struct {
Name string
// Server server_ip:port
Server string
// NoIP4 no dns.srv conn attempt via ip4
NoIP4 bool
// NoIP6 no dns.srv conn attempt via ip6
NoIP6 bool
// NoUDP no dns.src conn attempt via udp
NoUDP bool
// NoTCP no dns.src conn attempt via tcp
NoTCP bool
// DoT/TLS enforced, disables TCP & UDP
DoT bool
// TLSKeyPin for DoT (optional)
TLSKeyPin string
// TLSconfig TLS/DoT settings (optional)
// when custom tls.Config and TLSKeyPin are enabled a tlsconfig.VerifyConnection
// function is required (examples, see resolver.go or use tlsConfigPin(TLSKeyPin))
TLSConfig *tls.Config
// Timeout ...
Timeout time.Duration
}
Resolver ..
func ResolverViaProvider ¶
ResolverViaProvider ...
func (*Resolver) LookupAddr ¶
LookupAddr ...
func (*Resolver) LookupAddrs ¶
LookupAddrs ...
func (*Resolver) ReverseLookupIP4 ¶
ReverseLookupIP4 ...
Click to show internal directories.
Click to hide internal directories.