* use urlfilter v0.4.0
Now we pass filtering rules to urlfilter as filer file names, rather than the list of rule strings. (Note: user rules are still passed as the list of rule strings). As a result, we don't store the contents of filter files in memory.
This commit is contained in:
@@ -260,7 +260,11 @@ func (s *Server) initDNSFilter() error {
|
||||
if s.conf.FilteringEnabled {
|
||||
filters = make(map[int]string)
|
||||
for _, f := range s.conf.Filters {
|
||||
filters[int(f.ID)] = string(f.Data)
|
||||
if f.ID == 0 {
|
||||
filters[int(f.ID)] = string(f.Data)
|
||||
} else {
|
||||
filters[int(f.ID)] = f.FilePath
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user