Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChainRequest ¶
func ChainRequest(conn net.PacketConn, addr net.Addr, req *dnsmessage.Message) error
ChainRequest chains each DNS request to each plugin as registered
func QuestionsToString ¶
func QuestionsToString(req *dnsmessage.Message) string
QuestionsToString converts the questions of a DNS request to a hashable string
func RegisterBefore ¶
func RegisterBefore(plugin DNSPlugin)
RegisterBefore prepends a new plugin to ensure it's run first
Types ¶
type DNSHandler ¶
type DNSHandler func(net.PacketConn, net.Addr, *dnsmessage.Message) error
DNSHandler main func type implemented by plugins to handle DNS requests
type DNSPlugin ¶
type DNSPlugin interface { Name() string ServeDNS(DNSHandler) DNSHandler }
DNSPlugin basic plugin interface
Click to show internal directories.
Click to hide internal directories.