dns

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dns

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

func NewDns

func NewDns(config *util.Config) *Dns

NewDns creates a new Dns instance with the given configuration.

func (*Dns) ResolveHost

func (d *Dns) ResolveHost(ctx context.Context, host string, enableDoh, useSystemDns bool) (string, error)

ResolveHost resolves the given host using the appropriate resolver based on the configuration.

type Resolver

type Resolver interface {
	Resolve(ctx context.Context, host string, qTypes []uint16) ([]net.IPAddr, error)
	String() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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