.
This commit is contained in:
parent
86d8b09b34
commit
cf6f39e0da
@ -27,7 +27,7 @@ func cleanBadDomains(domains []string) []string {
|
||||
total = len(domains)
|
||||
list = []string{}
|
||||
for _, blocklistItem := range domains {
|
||||
if len([]rune(blocklistItem)) > 250 {
|
||||
if len([]rune(blocklistItem)) > 240 {
|
||||
continue
|
||||
}
|
||||
list = append(list, blocklistItem)
|
||||
@ -51,14 +51,16 @@ func cleanBadDomains(domains []string) []string {
|
||||
|
||||
list = []string{}
|
||||
for _, v := range domains {
|
||||
//log.Printf("[DEBUG] Processing %d of %d (%0.2f%%)\n", k+1, len(domains), float64((k+1)/len(domains)))
|
||||
addEntry := true
|
||||
for _, allowedItem := range goodAllowedItemList {
|
||||
if regexp.MustCompile(allowedItem).MatchString(v) {
|
||||
log.Printf("[DEBUG] Removing allowed matching item: %s\n", v)
|
||||
} else {
|
||||
list = append(list, v)
|
||||
addEntry = false
|
||||
}
|
||||
}
|
||||
if addEntry {
|
||||
list = append(list, v)
|
||||
}
|
||||
}
|
||||
domains = list
|
||||
log.Printf("[INFO] Allowed hosts removed: %d\n", total-len(domains))
|
||||
|
Loading…
x
Reference in New Issue
Block a user