dns

package
v1.15.1-0...-c88dd3e Latest Latest
Warning

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

Go to latest
Published: May 2, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const COMMON_DNS_PORT = 53

Variables

This section is empty.

Functions

This section is empty.

Types

type DnsCache

type DnsCache interface {
	// Query queries the response for the DNS request with payload `p`,
	// the response data should be a valid DNS response payload.
	Query(p []byte) []byte

	// Store stores the DNS response with payload `p` to the cache.
	Store(p []byte)
}

type FakeDns

type FakeDns interface {
	// GenerateFakeResponse generates a fake dns response for the specify request.
	GenerateFakeResponse(request []byte) ([]byte, error)

	// QueryDomain returns the corresponding domain for the given IP.
	QueryDomain(ip net.IP) string

	// IsFakeIP checks if the given ip is a fake IP.
	IsFakeIP(ip net.IP) bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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