resolver

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DnsServer

type DnsServer struct {
	netapi.DNSServer
	// contains filtered or unexported fields
}

func NewDNSServer

func NewDNSServer(resolver netapi.Resolver) *DnsServer

func (*DnsServer) Update

func (a *DnsServer) Update(s *pc.Setting)

type Entry added in v0.3.5

type Entry struct {
	Resolver netapi.Resolver
	Config   *pd.Dns
}

type Fakedns

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

func NewFakeDNS

func NewFakeDNS(dialer netapi.Proxy, upstream netapi.Resolver, bbolt, bboltv6 *cache.Cache) *Fakedns

func (*Fakedns) Close

func (f *Fakedns) Close() error

func (*Fakedns) Conn

func (f *Fakedns) Conn(ctx context.Context, addr netapi.Address) (net.Conn, error)

func (*Fakedns) Dispatch

func (f *Fakedns) Dispatch(ctx context.Context, addr netapi.Address) (netapi.Address, error)

func (*Fakedns) LookupIP

func (f *Fakedns) LookupIP(ctx context.Context, domain string, opts ...func(*netapi.LookupIPOption)) ([]net.IP, error)

func (*Fakedns) PacketConn

func (f *Fakedns) PacketConn(ctx context.Context, addr netapi.Address) (net.PacketConn, error)

func (*Fakedns) Raw

func (*Fakedns) Update

func (f *Fakedns) Update(c *pc.Setting)

type Hosts

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

func NewHosts

func NewHosts(dialer netapi.Proxy, resolver netapi.Resolver) *Hosts

func (*Hosts) Close

func (h *Hosts) Close() error

func (*Hosts) Conn

func (h *Hosts) Conn(ctx context.Context, addr netapi.Address) (net.Conn, error)

func (*Hosts) Dispatch

func (h *Hosts) Dispatch(ctx context.Context, addr netapi.Address) (netapi.Address, error)

func (*Hosts) LookupIP

func (h *Hosts) LookupIP(ctx context.Context, domain string, opts ...func(*netapi.LookupIPOption)) ([]net.IP, error)

func (*Hosts) PacketConn

func (h *Hosts) PacketConn(ctx context.Context, addr netapi.Address) (net.PacketConn, error)

func (*Hosts) Raw

func (*Hosts) Update

func (h *Hosts) Update(c *config.Setting)

type Resolver added in v0.3.5

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

func NewResolver added in v0.3.5

func NewResolver(dialer netapi.Proxy) *Resolver

func (*Resolver) Close added in v0.3.5

func (r *Resolver) Close() error

func (*Resolver) Get added in v0.3.5

func (r *Resolver) Get(str string) netapi.Resolver

func (*Resolver) GetIPv6 added in v0.3.5

func (r *Resolver) GetIPv6() bool

func (*Resolver) Update added in v0.3.5

func (r *Resolver) Update(c *pc.Setting)

Jump to

Keyboard shortcuts

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