dnsfwd

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2025 License: BSD-3-Clause Imports: 10 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) *DNSForwarder

func (*DNSForwarder) Close

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

func (*DNSForwarder) Listen

func (f *DNSForwarder) Listen(domains []string) error

func (*DNSForwarder) UpdateDomains

func (f *DNSForwarder) UpdateDomains(domains []string)

type Manager

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

func NewManager

func NewManager(fw firewall.Manager) *Manager

func (*Manager) Start

func (m *Manager) Start(domains []string) error

func (*Manager) Stop

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

func (*Manager) UpdateDomains

func (m *Manager) UpdateDomains(domains []string)

Jump to

Keyboard shortcuts

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