Fix #727 - apply client settings properly

This commit is contained in:
Andrey Meshkov 2019-06-06 21:04:17 +03:00
parent 0f7235f217
commit 5647bc1fc9
1 changed files with 4 additions and 12 deletions

16
dns.go
View File

@ -221,18 +221,10 @@ func applyClientSettings(clientAddr string, setts *dnsfilter.RequestFilteringSet
}
log.Debug("Using settings for client with IP %s", clientAddr)
if !c.FilteringEnabled {
setts.FilteringEnabled = false
}
if !c.SafeSearchEnabled {
setts.SafeSearchEnabled = false
}
if !c.SafeBrowsingEnabled {
setts.SafeBrowsingEnabled = false
}
if !c.ParentalEnabled {
setts.ParentalEnabled = false
}
setts.FilteringEnabled = c.FilteringEnabled
setts.SafeSearchEnabled = c.SafeSearchEnabled
setts.SafeBrowsingEnabled = c.SafeBrowsingEnabled
setts.ParentalEnabled = c.UseOwnSettings
}
func startDNSServer() error {