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) log.Debug("Using settings for client with IP %s", clientAddr)
if !c.FilteringEnabled { setts.FilteringEnabled = c.FilteringEnabled
setts.FilteringEnabled = false setts.SafeSearchEnabled = c.SafeSearchEnabled
} setts.SafeBrowsingEnabled = c.SafeBrowsingEnabled
if !c.SafeSearchEnabled { setts.ParentalEnabled = c.UseOwnSettings
setts.SafeSearchEnabled = false
}
if !c.SafeBrowsingEnabled {
setts.SafeBrowsingEnabled = false
}
if !c.ParentalEnabled {
setts.ParentalEnabled = false
}
} }
func startDNSServer() error { func startDNSServer() error {