dns

package
v0.0.0-...-40ec311 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDNSServers = []string{
	"1.1.1.1:53",
	"8.8.8.8:53",
	"208.67.222.222:53",
}

Functions

func CreateDialer

func CreateDialer(dnsServer string) func(context.Context, string, string) (net.Conn, error)

CreateDialer creates a dialer callback function for use with DNSLookup.

func DNSAAAALookup

func DNSAAAALookup(domain string, dnsServers []string) ([]net.IP, error)

func DNSALookup

func DNSALookup(domain string, dnsServers []string) ([]net.IP, error)

func DNSLookup

func DNSLookup(domain string, dnsServers []string) ([]net.IPAddr, error)

DNSLookup queries the specified DNS servers (or the default ones).

func MergeIPArrays

func MergeIPArrays(a []net.IPAddr, b []net.IPAddr) []net.IPAddr

MergeIPArrays: Merge two IP arrays.

Types

type DNSCaller

type DNSCaller func(string, []string) ([]net.IP, error)

Jump to

Keyboard shortcuts

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