Squashed commit of the following: commit 586b0eb180afc22d06d673756dd916c17a173361 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 12 19:58:56 2024 +0300 next: upd more commit d729aa150f7ac367255830cceca40b8880c51015 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Nov 12 16:53:15 2024 +0300 next/websvc: upd more commit 0c64e6cfc66b9212f077b2de7450586fd4d02802 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon Nov 11 21:08:51 2024 +0300 next: upd more commit 05eec75222360708621c99d3eeac7c8d9f2a5080 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Nov 8 19:20:02 2024 +0300 next: upd code
41 lines
1.1 KiB
Go
41 lines
1.1 KiB
Go
package dnssvc
|
|
|
|
import (
|
|
"log/slog"
|
|
"net/netip"
|
|
"time"
|
|
)
|
|
|
|
// Config is the AdGuard Home DNS service configuration structure.
|
|
//
|
|
// TODO(a.garipov): Add timeout for incoming requests.
|
|
type Config struct {
|
|
// Logger is used for logging the operation of the web API service. It must
|
|
// not be nil.
|
|
Logger *slog.Logger
|
|
|
|
// Addresses are the addresses on which to serve plain DNS queries.
|
|
Addresses []netip.AddrPort
|
|
|
|
// BootstrapServers are the addresses of DNS servers used for bootstrapping
|
|
// the upstream DNS server addresses.
|
|
BootstrapServers []string
|
|
|
|
// UpstreamServers are the upstream DNS server addresses to use.
|
|
UpstreamServers []string
|
|
|
|
// DNS64Prefixes is a slice of NAT64 prefixes to be used for DNS64. See
|
|
// also [Config.UseDNS64].
|
|
DNS64Prefixes []netip.Prefix
|
|
|
|
// UpstreamTimeout is the timeout for upstream requests.
|
|
UpstreamTimeout time.Duration
|
|
|
|
// BootstrapPreferIPv6, if true, instructs the bootstrapper to prefer IPv6
|
|
// addresses to IPv4 ones when bootstrapping.
|
|
BootstrapPreferIPv6 bool
|
|
|
|
// UseDNS64, if true, enables DNS64 protection for incoming requests.
|
|
UseDNS64 bool
|
|
}
|