Documentation ¶
Overview ¶
Package resolver contains the DNS resolver
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CensoringResolver ¶
type CensoringResolver struct {
// contains filtered or unexported fields
}
CensoringResolver is a censoring resolver.
func NewCensoringResolver ¶
func NewCensoringResolver( blocked, hijacked, ignored []string, uncensored httptransport.Resolver, ) *CensoringResolver
NewCensoringResolver creates a new CensoringResolver instance using the specified list of keywords to censor. blocked is the list of keywords that trigger NXDOMAIN if they appear in a query. hijacked is similar but redirects to 127.0.0.1, where the transparent HTTP and TLS proxies will pick them up. dnsNetwork and dnsAddress are the settings to configure the upstream, non censored DNS.
func (*CensoringResolver) ServeDNS ¶
func (r *CensoringResolver) ServeDNS(rw dns.ResponseWriter, req *dns.Msg)
ServeDNS serves a DNS request
Click to show internal directories.
Click to hide internal directories.