dns

package
v0.0.0-...-3139442 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var System = systemResolver{}

Functions

func CreateResolver

func CreateResolver(u *url.URL) (*customResolver, error)

func NewCustomResolver

func NewCustomResolver(bufSize int, client Client) *customResolver

func NewDoHClient

func NewDoHClient(server string, timeout time.Duration) *dohClient

func NewUDPClient

func NewUDPClient(server string, timeout time.Duration) *udpClient

Types

type Client

type Client interface {
	RoundTrip(req []byte) ([]byte, error)
}

type Resolver

type Resolver interface {
	Start()
	ResolveFakeIP(ip netip.Addr) string
	Lookup(host string) (netip.Addr, error)
	Debug() string
}

Jump to

Keyboard shortcuts

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