Documentation
¶
Overview ¶
Package handler provides some customizable DNS request handling logic used in the proxy.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Default ¶
type Default struct {
// contains filtered or unexported fields
}
Default implements the default configurable proxy.RequestHandler.
func NewDefault ¶
func NewDefault(conf *DefaultConfig) (d *Default)
NewDefault creates a new Default handler.
func (*Default) HandleRequest ¶
HandleRequest resolves the DNS request within proxyCtx. It only calls proxy.Proxy.Resolve if the request isn't handled by any of the internal handlers.
type DefaultConfig ¶
type DefaultConfig struct { // MessageConstructor constructs DNS messages. It must not be nil. MessageConstructor proxy.MessageConstructor // Logger is the logger. It must not be nil. Logger *slog.Logger // HostsFiles is the index containing the records of the hosts files. HostsFiles hostsfile.Storage // HaltIPv6 halts the processing of AAAA requests and makes the handler // reply with NODATA to them. HaltIPv6 bool }
DefaultConfig is the configuration for Default.
Click to show internal directories.
Click to hide internal directories.