upstream

package
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2020 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicUpstream added in v1.5.0

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

func (*BasicUpstream) Exchange added in v1.5.0

func (u *BasicUpstream) Exchange(ctx context.Context, q *dns.Msg) (r *dns.Msg, err error)

type Upstream

type Upstream interface {
	Exchange(ctx context.Context, q *dns.Msg) (r *dns.Msg, err error)
}

Upstream represents a dns upstream

func NewDoHUpstream

func NewDoHUpstream(urlEndpoint, addr, socks5 string, tlsConfig *tls.Config) (Upstream, error)

func NewDoTUpstream

func NewDoTUpstream(addr, socks5 string, idleTimeout time.Duration, tlsConfig *tls.Config) Upstream

func NewTCPUpstream

func NewTCPUpstream(addr, socks5 string, idleTimeout time.Duration) Upstream

func NewUDPUpstream

func NewUDPUpstream(addr string) Upstream

func NewUpstreamServer added in v1.5.0

func NewUpstreamServer(c *config.BasicUpstreamConfig, rootCAs *x509.CertPool) (Upstream, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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