Allow disabling of filtering but keeping querylog, safebrowsing, safesearch and parental working.

This commit is contained in:
Eugene Bujak
2018-09-25 19:26:26 +03:00
parent 50b188a086
commit 09a39cce03
3 changed files with 36 additions and 32 deletions

View File

@@ -160,16 +160,16 @@ func writeAllConfigs() error {
}
const coreDNSConfigTemplate = `. {
{{if .FilteringEnabled}}dnsfilter {{.FilterFile}} {
dnsfilter {{if .FilteringEnabled}}{{.FilterFile}}{{end}} {
{{if .SafeBrowsingEnabled}}safebrowsing{{end}}
{{if .ParentalEnabled}}parental {{.ParentalSensitivity}}{{end}}
{{if .SafeSearchEnabled}}safesearch{{end}}
{{if .QueryLogEnabled}}querylog{{end}}
}{{end}}
}
{{.Pprof}}
hosts {
fallthrough
}
hosts {
fallthrough
}
{{if .UpstreamDNS}}forward . {{range .UpstreamDNS}}{{.}} {{end}}{{end}}
{{.Cache}}
{{.Prometheus}}