Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CustomResolver ¶
type CustomResolver interface { LookupRaw(name string, rType uint16) *dns.Msg LookupRawAppend(r *dns.Msg, name string, rType uint16) LookupRawA(name string) []*dns.A LookupRawTXT(name string) *dns.TXT }
func NewCloudFlareDNS ¶
func NewCloudFlareDNS(modOptions ...ModOption) CustomResolver
func NewDoH ¶
func NewDoH(modOptions ...ModOption) CustomResolver
func NewGoogleDNS ¶
func NewGoogleDNS(modOptions ...ModOption) CustomResolver
func NewTraditionDNS ¶
func NewTraditionDNS(modOptions ...ModOption) CustomResolver
type DoH ¶
type DoH struct {
// contains filtered or unexported fields
}
func (*DoH) RefreshCache ¶
func (c *DoH) RefreshCache()
type DohResponse ¶
type DohResponse struct { Status int `json:"Status"` // 0=NOERROR, 2=SERVFAIL - Standard DNS response code (32 bit integer) TC bool `json:"TC"` // Whether the response is truncated RD bool `json:"RD"` // Always true for Google Public DNS RA bool `json:"RA"` // Always true for Google Public DNS AD bool `json:"AD"` // Whether all response data was validated with DNSSEC CD bool `json:"CD"` // Whether the dnsclient asked to disable DNSSEC Question []struct { Name string `json:"name"` // FQDN with trailing dot Type int `json:"type"` // Standard DNS RR type } `json:"Question"` Answer []*DohCommon `json:"Answer"` Authority []*DohCommon `json:"Authority"` Additional []interface{} `json:"Additional"` EdnsClientSubnet string `json:"edns_client_subnet"` // IP address / scope prefix-length Comment string `json:"Comment"` // Diagnostics information in case of an error }
requestResponse contains the response from a DNS query. Both Google and Cloudflare seem to share a scheme here. As in:
https://tools.ietf.org/id/draft-bortzmeyer-dns-json-01.html
https://developers.google.com/speed/public-dns/docs/dns-over-https#dns_response_in_json https://developers.cloudflare.com/1.1.1.1/dns-over-https/json-format/
type Tradition ¶
type Tradition struct {
// contains filtered or unexported fields
}
func (*Tradition) LookupRawAppend ¶
Click to show internal directories.
Click to hide internal directories.