Documentation ¶
Overview ¶
Package preservice contains the middleware that comes right before the main filtering middleware of DNS service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Messages is used to construct TXT responses. Messages *dnsmsg.Constructor // HashMatcher is the safe browsing DNS hashMatcher. HashMatcher filter.HashMatcher // Checker is used to detect and process DNS-check requests. Checker dnscheck.Interface }
Config is the configurational structure for the preservice middleware. All fields must be non-nil.
type Middleware ¶
type Middleware struct {
// contains filtered or unexported fields
}
Middleware is a middleware that comes right before the main filtering middleware of DNS service. It includes handling of TXT queries for domain names that may be filtered by safe browsing or parental control filters as well as handling of the DNS-server check queries.
func New ¶
func New(c *Config) (mw *Middleware)
New returns a new preservice middleware. c must not be nil.
func (*Middleware) Wrap ¶
func (mw *Middleware) Wrap(next dnsserver.Handler) (wrapped dnsserver.Handler)
Wrap implements the dnsserver.Middleware interface for *Middleware.
Click to show internal directories.
Click to hide internal directories.