Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNSQueryHandler ¶
type DNSQueryHandler struct {
// contains filtered or unexported fields
}
DNSQueryHandler represents a DNS query handler.
func New ¶
func New( logger *slog.Logger, exchanger exchanger, nameservers chooser, blocklist set, ) *DNSQueryHandler
New returns a new instance of DNSQueryHandler.
func (*DNSQueryHandler) HandleAandAAAA ¶
func (s *DNSQueryHandler) HandleAandAAAA(w dns.ResponseWriter, r *dns.Msg)
HandleAandAAAA handles DNS queries for class INET and types A and AAAA. If the requested domain name is blocked, it responds with `0.0.0.0` for A (or `::` for AAAA). Otherwise, it forwards the request to an upstream server.
Click to show internal directories.
Click to hide internal directories.