doh

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrHTTPStatus = errors.New("bad HTTP status")
)

Functions

func NewResolver

func NewResolver(settings ResolverSettings) *net.Resolver

NewResolver creates a DNS over HTTPs resolver.

Types

type ResolverSettings

type ResolverSettings struct {
	DoHProviders []provider.Provider
	SelfDNS      SelfDNS
	Timeout      time.Duration
}

func (*ResolverSettings) Lines

func (s *ResolverSettings) Lines(indent, subSection string) (lines []string)

func (*ResolverSettings) String

func (s *ResolverSettings) String() string

type SelfDNS

type SelfDNS struct {
	// for the internal HTTP client to resolve the DoH url hostname.
	DoTProviders []provider.Provider
	DNSProviders []provider.Provider
	Timeout      time.Duration
	IPv6         bool
}

func (*SelfDNS) Lines

func (s *SelfDNS) Lines(indent, subSection string) (lines []string)

func (*SelfDNS) String

func (s *SelfDNS) String() string

type Server

type Server interface {
	Run(ctx context.Context, stopped chan<- error)
}

func NewServer

func NewServer(ctx context.Context, logger logging.Logger,
	settings ServerSettings) Server

type ServerSettings

type ServerSettings struct {
	Resolver  ResolverSettings
	Port      uint16
	Cache     cache.Settings
	Blacklist blacklist.Settings
}

func (*ServerSettings) Lines

func (s *ServerSettings) Lines(indent, subSection string) (lines []string)

func (*ServerSettings) String

func (s *ServerSettings) String() string

Directories

Path Synopsis
Package mock_doh is a generated GoMock package.
Package mock_doh is a generated GoMock package.

Jump to

Keyboard shortcuts

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