dnsproxy

package
v2.21.2-rc.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHeader

func NewHeader(qName string, qType uint16) dns.RR_Header

func PtrAddress

func PtrAddress(addr string) (netip.Addr, error)

func SupportedType added in v2.9.0

func SupportedType(qType uint16) bool

func ToRPC

func ToRPC(rrs RRs, rCode int) (*manager.DNSResponse, error)

Types

type RRs

type RRs []dns.RR

func FromRPC

func FromRPC(r *manager.DNSResponse) (RRs, int, error)

func Lookup

func Lookup(ctx context.Context, qType uint16, qName string) (RRs, int, error)

func (RRs) String

func (a RRs) String() string

type ResolveFile added in v2.19.0

type ResolveFile struct {
	Port        int
	Domain      string
	Nameservers []string
	Search      []string
	Options     []string
}

func ReadResolveFile added in v2.19.0

func ReadResolveFile(fileName string) (*ResolveFile, error)

func (*ResolveFile) Equals added in v2.19.0

func (r *ResolveFile) Equals(o *ResolveFile) bool

func (*ResolveFile) String added in v2.19.0

func (r *ResolveFile) String() string

func (*ResolveFile) Write added in v2.19.0

func (r *ResolveFile) Write(fileName string) error

func (*ResolveFile) WriteTo added in v2.19.0

func (r *ResolveFile) WriteTo(buf io.Writer) (int64, error)

Jump to

Keyboard shortcuts

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