Documentation ¶
Index ¶
- Variables
- func DOHJsonAPI(DNSServer, domain string, ...) (DNS []net.IP, err error)
- func New(config Config) dns.DNS
- func NewClient(config Config, send func([]byte) ([]byte, error)) *client
- func NewDnsServer(server string, process proxy.ResolverProxy) server.DNSServer
- func NewDoH(config Config) dns.DNS
- func NewDoH3(config Config) dns.DNS
- func NewDoQ(config Config) dns.DNS
- func NewDoT(config Config) dns.DNS
- func NewDoU(config Config) dns.DNS
- func NewTCP(config Config) dns.DNS
- func Register(tYPE pdns.Type, f func(Config) dns.DNS)
- func Resolve(req, answer []byte) (resp []net.IP, err error)
- type Answer
- type Config
- type DOHJson
- type EDNSOPT
- type Fake
- type FakeDNS
- type Question
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Reserved = EDNSOPT{0b00000000, 0b00000000} //0 LLQ = EDNSOPT{0b00000000, 0b00000001} //1 Optional UL = EDNSOPT{0b00000000, 0b00000010} //2 On-hold NSID = EDNSOPT{0b00000000, 0b00000011} //3 Standard Reserved2 = EDNSOPT{0b00000000, 0b00000100} //4 DAU = EDNSOPT{0b00000000, 0b00000101} //5 Standard DHU = EDNSOPT{0b00000000, 0b00000110} //6 Standard N3U = EDNSOPT{0b00000000, 0b00000111} //7 Standard EdnsClientSubnet = EDNSOPT{0b00000000, 0b00001000} //8 Optional EDNSEXPIRE = EDNSOPT{0b00000000, 0b00001001} //9 Optional COOKIE = EDNSOPT{0b00000000, 0b00001010} //10 Standard TcpKeepalive = EDNSOPT{0b00000000, 0b00001011} //11 Standard Padding = EDNSOPT{0b00000000, 0b00001100} //12 Standard CHAIN = EDNSOPT{0b00000000, 0b00001101} //13 Standard KEYTAG = EDNSOPT{0b00000000, 0b00001110} //14 Optional ExtendedDNSError = EDNSOPT{0b00000000, 0b00001111} //15 Standard EDNSClientTag = EDNSOPT{0b00000000, 0b00010000} //16 Optional EDNSServerTag = EDNSOPT{0b00000000, 0b00010001} //17 Optional )
https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-11
View Source
var ( A = reqType{0b00000000, 0b00000001} // 1 NS = reqType{0b00000000, 0b00000010} // 2 MD = reqType{0b00000000, 0b00000011} // 3 MF = reqType{0b00000000, 0b00000100} // 3 CNAME = reqType{0b00000000, 0b00000101} // 5 SOA = reqType{0b00000000, 0b00000110} // 6 MB = reqType{0b00000000, 0b00000111} // 7 MG = reqType{0b00000000, 0b00001000} // 8 MR = reqType{0b00000000, 0b00001001} // 9 NULL = reqType{0b00000000, 0b00001010} // 10 WKS = reqType{0b00000000, 0b00001011} // 11 PTR = reqType{0b00000000, 0b00001100} // 12 HINFO = reqType{0b00000000, 0b00001101} // 13 MINFO = reqType{0b00000000, 0b00001110} // 14 MX = reqType{0b00000000, 0b00001111} // 15 TXT = reqType{0b00000000, 0b00010000} // 16 AAAA = reqType{0b00000000, 0b00011100} // 28 https://www.ietf.org/rfc/rfc3596.txt RRSIG = reqType{0b00000000, 0b00101110} // 46 dnssec // only for req AXFR = reqType{0b00000000, 0b11111100} // 252 ANY = reqType{0b00000000, 0b11111111} // 255 )
View Source
var ErrNoIPFound = errors.New("no ip fond")
View Source
var TlsProtos = []string{"doq-i02"}
View Source
var TlsProtosCompat = []string{"doq-i02", "doq-i01", "doq-i00", "doq", "dq"}
TlsProtosCompat stores alternative TLS protocols for experimental interoperability
Functions ¶
func DOHJsonAPI ¶
func NewDnsServer ¶
func NewDnsServer(server string, process proxy.ResolverProxy) server.DNSServer
Types ¶
type Fake ¶
type Fake struct {
// contains filtered or unexported fields
}
func (*Fake) GetFakeIPForDomain ¶
GetFakeIPForDomain checks and generates a fake IP for a domain name
Click to show internal directories.
Click to hide internal directories.