resolver

package
v0.3.1-rc.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBootstrap

func NewBootstrap(dl proxy.Proxy) id.DNS

func NewDNSServer

func NewDNSServer(resolver id.DNS) server.DNSServer

func NewLocal

func NewLocal(dl proxy.Proxy) id.DNS

func NewRemote

func NewRemote(dl proxy.Proxy) id.DNS

Types

type DnsServer

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

func (*DnsServer) Update

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

type Fakedns

type Fakedns struct {

	// current dns client(fake/upstream)
	id.DNS
	// contains filtered or unexported fields
}

func NewFakeDNS

func NewFakeDNS(dialer proxy.Proxy, upstream id.DNS, bbolt *cache.Cache) *Fakedns

func (*Fakedns) Conn

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

func (*Fakedns) Dispatch

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

func (*Fakedns) PacketConn

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

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 proxy.Proxy, resolver dns.DNS) *Hosts

func (*Hosts) Close

func (h *Hosts) Close() error

func (*Hosts) Conn

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

func (*Hosts) Dispatch

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

func (*Hosts) Do

func (h *Hosts) Do(ctx context.Context, addr string, b []byte) ([]byte, 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 proxy.Address) (net.PacketConn, error)

func (*Hosts) Record

func (h *Hosts) Record(ctx context.Context, domain string, t dnsmessage.Type) ([]net.IP, uint32, error)

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