This commit is contained in:
Fernando Fernández 2025-10-11 17:31:24 +02:00 committed by GitHub
commit 015fc5ca78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 {
@ -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"`
@ -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,