dnsqueryhandler

package
v0.0.0-...-c7dad67 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL