resolver

package
v0.3.7 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 23 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

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, db *bbolt.DB) *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

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

func NewResolver

func NewResolver(dd netapi.Proxy) *Resolver

func (*Resolver) Close

func (r *Resolver) Close() error

func (*Resolver) Get

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

func (*Resolver) GetIPv6

func (r *Resolver) GetIPv6() bool

func (*Resolver) Update

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