dnsfwd

package
v0.43.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2025 License: BSD-3-Clause Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ListenPort is the port that the DNS forwarder listens on. It has been used by the client peers also
	ListenPort = 5353
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSForwarder

type DNSForwarder struct {
	// contains filtered or unexported fields
}

func NewDNSForwarder

func NewDNSForwarder(listenAddress string, ttl uint32, firewall firewall.Manager, statusRecorder *peer.Status) *DNSForwarder

func (*DNSForwarder) Close

func (f *DNSForwarder) Close(ctx context.Context) error

func (*DNSForwarder) Listen

func (f *DNSForwarder) Listen(entries []*ForwarderEntry) error

func (*DNSForwarder) UpdateDomains

func (f *DNSForwarder) UpdateDomains(entries []*ForwarderEntry)

type ForwarderEntry added in v0.43.0

type ForwarderEntry struct {
	Domain domain.Domain
	ResID  route.ResID
	Set    firewall.Set
}

ForwarderEntry is a mapping from a domain to a resource ID and a hash of the parent domain list.

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(fw firewall.Manager, statusRecorder *peer.Status) *Manager

func (*Manager) Start

func (m *Manager) Start(fwdEntries []*ForwarderEntry) error

func (*Manager) Stop

func (m *Manager) Stop(ctx context.Context) error

func (*Manager) UpdateDomains

func (m *Manager) UpdateDomains(entries []*ForwarderEntry)

Jump to

Keyboard shortcuts

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