local

package
v0.74.7 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerConnectivity added in v0.72.0

type PeerConnectivity interface {
	IsConnectedByIP(ip string) (known, connected bool)
}

PeerConnectivity reports whether a tunnel IP belongs to a peer the client knows about and whether that peer is currently connected. The local resolver uses this to suppress A/AAAA answers whose RDATA points at a disconnected peer (typical case: a synthesized private-service record pointing at an embedded proxy peer that just went offline).

known=false means the IP isn't in the local peerstore at all — the record is left alone (it points at something outside our mesh, e.g. a non-peer upstream).

type Resolver

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

func NewResolver

func NewResolver() *Resolver

func (*Resolver) ID

func (d *Resolver) ID() types.HandlerID

ID returns the unique handler ID

func (*Resolver) MatchSubdomains

func (d *Resolver) MatchSubdomains() bool

func (*Resolver) RegisterRecord

func (d *Resolver) RegisterRecord(record nbdns.SimpleRecord) error

RegisterRecord stores a new record by appending it to any existing list

func (*Resolver) ServeDNS

func (d *Resolver) ServeDNS(w dns.ResponseWriter, r *dns.Msg)

ServeDNS handles a DNS request

func (*Resolver) SetPeerConnectivity added in v0.72.0

func (d *Resolver) SetPeerConnectivity(p PeerConnectivity)

SetPeerConnectivity wires the per-IP connectivity check used to filter out A/AAAA answers pointing at disconnected peers. Pass nil to disable. Safe to call multiple times; the latest value wins.

func (*Resolver) Stop

func (d *Resolver) Stop()

func (*Resolver) String

func (d *Resolver) String() string

String returns a string representation of the local resolver

func (*Resolver) Update

func (d *Resolver) Update(customZones []nbdns.CustomZone)

Update replaces all zones and their records

Jump to

Keyboard shortcuts

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