- single/double and local lists: ignore blank/comment lines
							parent
							
								
									946a2245cc
								
							
						
					
					
						commit
						aef07c50d6
					
				| 
						 | 
					@ -107,6 +107,9 @@ func downloadDoubleThread() {
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			s := fileByLines(ZabovDoubleBL)
 | 
								s := fileByLines(ZabovDoubleBL)
 | 
				
			||||||
			for _, v := range s {
 | 
								for _, v := range s {
 | 
				
			||||||
 | 
									if len(v) == 0 || strings.TrimSpace(v)[0] == '#' {
 | 
				
			||||||
 | 
										continue
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
				configs := _urls[v]
 | 
									configs := _urls[v]
 | 
				
			||||||
				if configs == nil {
 | 
									if configs == nil {
 | 
				
			||||||
					configs = stringarray{}
 | 
										configs = stringarray{}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -108,6 +108,9 @@ func downloadThread() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			s := fileByLines(ZabovSingleBL)
 | 
								s := fileByLines(ZabovSingleBL)
 | 
				
			||||||
			for _, v := range s {
 | 
								for _, v := range s {
 | 
				
			||||||
 | 
									if len(v) == 0 || strings.TrimSpace(v)[0] == '#' {
 | 
				
			||||||
 | 
										continue
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
				configs := _urls[v]
 | 
									configs := _urls[v]
 | 
				
			||||||
				if configs == nil {
 | 
									if configs == nil {
 | 
				
			||||||
					configs = stringarray{}
 | 
										configs = stringarray{}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,6 +4,7 @@ import (
 | 
				
			||||||
	"bufio"
 | 
						"bufio"
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"os"
 | 
						"os"
 | 
				
			||||||
 | 
						"strings"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func init() {
 | 
					func init() {
 | 
				
			||||||
| 
						 | 
					@ -41,6 +42,9 @@ func ingestLocalBlacklists() {
 | 
				
			||||||
		scanner := bufio.NewScanner(file)
 | 
							scanner := bufio.NewScanner(file)
 | 
				
			||||||
		for scanner.Scan() {
 | 
							for scanner.Scan() {
 | 
				
			||||||
			d := scanner.Text()
 | 
								d := scanner.Text()
 | 
				
			||||||
 | 
								if len(d) == 0 || strings.TrimSpace(d)[0] == '#' {
 | 
				
			||||||
 | 
									continue
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
			DomainKill(d, ZabovHostsFile, configs)
 | 
								DomainKill(d, ZabovHostsFile, configs)
 | 
				
			||||||
			incrementStats("Blacklist", 1)
 | 
								incrementStats("Blacklist", 1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue