dnsutils

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Overview

Package dnsutils provides dns specific utils functions and packages

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainsDNSConfig added in v1.5.0

func ContainsDNSConfig(array []*networkservice.DNSConfig, value *networkservice.DNSConfig) bool

ContainsDNSConfig returns true if array contains a specific dns config

func ListenAndServe

func ListenAndServe(ctx context.Context, handler Handler, listenOn string)

ListenAndServe starts dns server with specific handler. Listens both udp/tcp networks. ctx is using for keeping the server alive. As soon as <-ctx.Done() happens it stops dns server. handler is using for hanlding dns queries. listenOn is using for listen. Expects {ip}:{port} to listen. Examples: "127.0.0.1:53", ":53".

Types

type Handler

type Handler interface {
	ServeDNS(ctx context.Context, rp dns.ResponseWriter, m *dns.Msg)
}

Handler handles dns queries

Directories

Path Synopsis
Package adapt provides possible to adapt dns.Handler to dnsutils.Handler
Package adapt provides possible to adapt dns.Handler to dnsutils.Handler
Package cache stores successful requests to DNS server
Package cache stores successful requests to DNS server
Package chain provides a simple file for creating a dnsutils.Handler from a 'chain' of dnsutils.Handler
Package chain provides a simple file for creating a dnsutils.Handler from a 'chain' of dnsutils.Handler
Package checkmsg checks if dns message is correct
Package checkmsg checks if dns message is correct
Package connect simply connects to the concrete endpoint
Package connect simply connects to the concrete endpoint
Package dnsconfigs stores DNS configs
Package dnsconfigs stores DNS configs
Package fanout sends incoming queries in parallel to few endpoints
Package fanout sends incoming queries in parallel to few endpoints
Package memory provides a/aaaa memory storage
Package memory provides a/aaaa memory storage
Package next allows to dns handlers be joined into chain
Package next allows to dns handlers be joined into chain
Package noloop prevents loops
Package noloop prevents loops
Package norecursion disables recursion for the incomming query.
Package norecursion disables recursion for the incomming query.
Package searches makes requests to all subdomains received from DNS configs
Package searches makes requests to all subdomains received from DNS configs
Package trace provides a wrapper for tracing around a dnsutils.Handler
Package trace provides a wrapper for tracing around a dnsutils.Handler

Jump to

Keyboard shortcuts

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