dns

package
v2.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Public & free DNS servers
	PublicResolvers = []string{
		"1.1.1.1:53",
		"8.8.8.8:53",
		"64.6.64.6:53",
		"208.67.222.222:53",
		"77.88.8.8:53",
		"74.82.42.42:53",
		"1.0.0.1:53",
		"8.8.4.4:53",
		"208.67.220.220:53",
		"77.88.8.1:53",
	}

	CustomResolvers = []string{}
)

Functions

func DNSDialContext

func DNSDialContext(ctx context.Context, network, address string) (net.Conn, error)

func DetectWildcard

func DetectWildcard(domain, subdomain string, records []DNSAnswer) bool

DetectWildcard - Checks subdomains in the wildcard cache for matches on the IP address

func DialContext

func DialContext(ctx context.Context, network, address string) (net.Conn, error)

func NextResolverAddress

func NextResolverAddress() string

NextResolverAddress - Requests the next server

func Reverse

func Reverse(addr string) (string, error)

func SetCustomResolvers

func SetCustomResolvers(resolvers []string)

func ZoneTransfer

func ZoneTransfer(domain, sub, server string) ([]string, error)

Types

type DNSAnswer

type DNSAnswer struct {
	Name string `json:"name"`
	Type int    `json:"type"`
	TTL  int    `json:"TTL"`
	Data string `json:"data"`
}

func ExchangeConn

func ExchangeConn(conn net.Conn, name string, qtype uint16) ([]DNSAnswer, error)

ExchangeConn - Encapsulates miekg/dns usage

func ObtainAllRecords

func ObtainAllRecords(name string) ([]DNSAnswer, error)

func Resolve

func Resolve(name, qtype string) ([]DNSAnswer, error)

Jump to

Keyboard shortcuts

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