Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion internal/dnsforward/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ import (
"github.com/ameshkov/dnscrypt/v2"
)

// See https://github.com/AdguardTeam/dnsproxy for more details about some of the
// settings.

// Config represents the DNS filtering configuration of AdGuard Home. The zero
// Config is empty and ready for use.
type Config struct {
Expand Down Expand Up @@ -139,9 +142,12 @@ type Config struct {
EDNSClientSubnet *EDNSClientSubnet `yaml:"edns_client_subnet"`

// MaxGoroutines is the max number of parallel goroutines for processing
// incoming requests.
// incoming requests. 0 means no limit.
MaxGoroutines uint `yaml:"max_goroutines"`

// Set the size of the UDP buffer in bytes. A value <= 0 will use the system default.
UDPBufferSize int `yaml:"udp_buf_size"`

// HandleDDR, if true, handle DDR requests
HandleDDR bool `yaml:"handle_ddr"`

Expand Down Expand Up @@ -337,6 +343,7 @@ func (s *Server) newProxyConfig(ctx context.Context) (conf *proxy.Config, err er
HTTPSServerName: aghhttp.UserAgent(),
EnableEDNSClientSubnet: srvConf.EDNSClientSubnet.Enabled,
MaxGoroutines: srvConf.MaxGoroutines,
UDPBufferSize: srvConf.UDPBufferSize,
UseDNS64: srvConf.UseDNS64,
DNS64Prefs: srvConf.DNS64Prefixes,
UsePrivateRDNS: srvConf.UsePrivateRDNS,
Expand Down