resolve

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

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

func NewResolver

func NewResolver(stack stack.Stack, remoteDNSServer, secondaryDNSServer string, ttl uint64, domainResource map[string]bool, dnsResource map[string]net.IP, useRemoteDNS bool) *Resolver

func (*Resolver) CleanCache added in v0.7.0

func (r *Resolver) CleanCache(duration time.Duration)

func (*Resolver) RemoteUDPResolver

func (r *Resolver) RemoteUDPResolver() (*net.Resolver, error)

func (*Resolver) Resolve

func (r *Resolver) Resolve(ctx context.Context, host string) (context.Context, net.IP, error)

Resolve ip address. If the host should be visited via VPN, this function set a USE_VPN value in context

func (*Resolver) ResolveWithSecondaryDNS

func (r *Resolver) ResolveWithSecondaryDNS(ctx context.Context, host string) (context.Context, net.IP, error)

func (*Resolver) SetPermanentDNS

func (r *Resolver) SetPermanentDNS(host string, ip net.IP)

Jump to

Keyboard shortcuts

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