resolver

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBootstrap

func NewBootstrap(dl netapi.Proxy) netapi.Resolver

func NewLocal

func NewLocal(dl netapi.Proxy) netapi.Resolver

func NewRemote

func NewRemote(dl netapi.Proxy) netapi.Resolver

Types

type DnsServer

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

func NewDNSServer

func NewDNSServer(resolver netapi.Resolver) *DnsServer

func (*DnsServer) Update

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

type Fakedns

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

func NewFakeDNS

func NewFakeDNS(dialer netapi.Proxy, upstream netapi.Resolver, bbolt *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) ([]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) ([]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)

Jump to

Keyboard shortcuts

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