mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-26 15:05:50 +03:00
Merge branch 'master' of ssh://bit.adguard.com:7999/dns/adguard-home
This commit is contained in:
commit
1e2e965ea7
2 changed files with 5 additions and 0 deletions
|
@ -81,6 +81,7 @@ type FilteringConfig struct {
|
|||
AAAADisabled bool `yaml:"aaaa_disabled"` // Respond with an empty answer to all AAAA requests
|
||||
EnableDNSSEC bool `yaml:"enable_dnssec"` // Set DNSSEC flag in outcoming DNS request
|
||||
EnableEDNSClientSubnet bool `yaml:"edns_client_subnet"` // Enable EDNS Client Subnet option
|
||||
MaxGoroutines uint32 `yaml:"max_goroutines"` // Max. number of parallel goroutines for processing incoming requests
|
||||
}
|
||||
|
||||
// TLSConfig is the TLS configuration for HTTPS, DNS-over-HTTPS, and DNS-over-TLS
|
||||
|
@ -144,6 +145,7 @@ func (s *Server) createProxyConfig() (proxy.Config, error) {
|
|||
BeforeRequestHandler: s.beforeRequestHandler,
|
||||
RequestHandler: s.handleDNSRequest,
|
||||
EnableEDNSClientSubnet: s.conf.EnableEDNSClientSubnet,
|
||||
MaxGoroutines: int(s.conf.MaxGoroutines),
|
||||
}
|
||||
|
||||
if s.conf.CacheSize != 0 {
|
||||
|
|
|
@ -176,6 +176,9 @@ func (s *Server) Prepare(config *ServerConfig) error {
|
|||
return fmt.Errorf("DNS: invalid custom blocking IP address specified")
|
||||
}
|
||||
}
|
||||
if s.conf.MaxGoroutines == 0 {
|
||||
s.conf.MaxGoroutines = 50
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Set default values in the case if nothing is configured
|
||||
|
|
Loading…
Reference in a new issue