dns

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DNSLookupAddr = net.LookupAddr
	DNSLookupHost = net.LookupHost
)

Functions

This section is empty.

Types

type Dns

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

func New

func New(ctx context.Context, cache *DnsCache) *Dns

func (*Dns) ArpaReverseIP

func (d *Dns) ArpaReverseIP(addr string) (string, error)

ArpaReverseIP performs translation from ip v4/v6 to arpa reverse notation

func (*Dns) LookupHost

func (d *Dns) LookupHost(host string) ([]string, error)

LookupHost performs a forward DNS lookup for the given hostname.

func (*Dns) ReverseDNS

func (d *Dns) ReverseDNS(addr string) ([]string, error)

ReverseDNS performs a reverse DNS lookup for the given IP address and trims the trailing dot from the results.

func (*Dns) VerifyFCrDNS

func (d *Dns) VerifyFCrDNS(addr string, pattern *string) bool

VerifyFCrDNS performs a forward-confirmed reverse DNS (FCrDNS) lookup for the given IP address, optionally matching against a provided pattern.

type DnsCache

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

func NewDNSCache

func NewDNSCache(forwardTTL int, reverseTTL int, backend store.Interface) *DnsCache

Jump to

Keyboard shortcuts

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