Fix #727 - apply client settings properly
This commit is contained in:
parent
0f7235f217
commit
5647bc1fc9
16
dns.go
16
dns.go
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue