MCPcopy
hub / github.com/nextdns/nextdns / Proxy

Struct Proxy

proxy/proxy.go:41–77  ·  view source on GitHub ↗

Proxy is a DNS53 to DNS over anything proxy.

Source from the content-addressed store, hash-verified

39
40// Proxy is a DNS53 to DNS over anything proxy.
41type Proxy struct {
42 // Addrs specifies the TCP/UDP address to listen to, :53 if empty.
43 Addrs []string
44
45 // LocalResolver is called before the upstream to resolve local hostnames or
46 // IPs.
47 LocalResolver HostResolver
48
49 // Upstream specifies the resolver used for incoming queries.
50 Upstream resolver.Resolver
51
52 // DiscoveryResolver is called after the upstream if no result was found.
53 DiscoveryResolver HostResolver
54
55 // BogusPriv specifies that reverse lookup on private subnets are answerd
56 // with NXDOMAIN.
57 BogusPriv bool
58
59 // Timeout defines the maximum allowed time allowed for a request before
60 // being cancelled.
61 Timeout time.Duration
62
63 // Maximum number of inflight requests. Further requests will
64 // not be answered.
65 MaxInflightRequests uint
66
67 // QueryLog specifies an optional log function called for each received query.
68 QueryLog func(QueryInfo)
69
70 // InfoLog specifies an option log function called when some actions are
71 // performed.
72 InfoLog func(string)
73
74 // ErrorLog specifies an optional log function for errors. If not set,
75 // errors are not reported.
76 ErrorLog func(error)
77}
78
79const defaultMaxInflightRequests = 256
80

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected