forked from loweel/zabov
				
			- FIX: optional settings were not optional
- Dockerfile: updated golang image to 1.15.6 - config.json: restored minimal settings - added config.sample.json with all advanced settings - urls-domains-updated.txt: removed/updated obsolete urls (CHEF-KOCH, malwaredomains.com)remotes/1680050961956510080/tmp_refs/heads/master
							parent
							
								
									740e0a387b
								
							
						
					
					
						commit
						749029ba5b
					
				
							
								
								
									
										11
									
								
								01.conf.go
								
								
								
								
							
							
						
						
									
										11
									
								
								01.conf.go
								
								
								
								
							| 
						 | 
				
			
			@ -88,12 +88,14 @@ func init() {
 | 
			
		|||
	//*******************
 | 
			
		||||
	// IP aliases section
 | 
			
		||||
	//*******************
 | 
			
		||||
	if MyConf["ipaliases"] != nil {
 | 
			
		||||
		IPAliasesRaw := MyConf["ipaliases"].(map[string]interface{})
 | 
			
		||||
 | 
			
		||||
		for alias, ip := range IPAliasesRaw {
 | 
			
		||||
			fmt.Println("IP Alias:", alias, ip)
 | 
			
		||||
			ZabovIPAliases[alias] = ip.(string)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//****************
 | 
			
		||||
	// configs section
 | 
			
		||||
| 
						 | 
				
			
			@ -119,6 +121,7 @@ func init() {
 | 
			
		|||
	//*******************
 | 
			
		||||
	// timetables section
 | 
			
		||||
	//*******************
 | 
			
		||||
	if MyConf["timetables"] != nil {
 | 
			
		||||
		timetables := MyConf["timetables"].(map[string]interface{})
 | 
			
		||||
 | 
			
		||||
		for name, v := range timetables {
 | 
			
		||||
| 
						 | 
				
			
			@ -186,10 +189,12 @@ func init() {
 | 
			
		|||
			}
 | 
			
		||||
			ZabovTimetables[name] = &timetable
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//******************
 | 
			
		||||
	// IP groups section
 | 
			
		||||
	//******************
 | 
			
		||||
	if MyConf["ipgroups"] != nil {
 | 
			
		||||
		IPGroups := MyConf["ipgroups"].([]interface{})
 | 
			
		||||
 | 
			
		||||
		fmt.Println("evaluating IP Groups: ", len(IPGroups))
 | 
			
		||||
| 
						 | 
				
			
			@ -231,6 +236,7 @@ func init() {
 | 
			
		|||
			}
 | 
			
		||||
			ZabovIPGroups = append(ZabovIPGroups, groupStruct)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if zabov["timetable"] != nil {
 | 
			
		||||
		ZabovDefaultTimetable = zabov["timetable"].(string)
 | 
			
		||||
| 
						 | 
				
			
			@ -244,6 +250,7 @@ func init() {
 | 
			
		|||
	//************************
 | 
			
		||||
	// Local responser section
 | 
			
		||||
	//************************
 | 
			
		||||
	if MyConf["localresponder"] != nil {
 | 
			
		||||
		localresponder := MyConf["localresponder"].(map[string]interface{})
 | 
			
		||||
 | 
			
		||||
		if localresponder != nil {
 | 
			
		||||
| 
						 | 
				
			
			@ -259,9 +266,9 @@ func init() {
 | 
			
		|||
				ZabovLocalDomain = localresponder["localdomain"].(string)
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
	//******************************************
 | 
			
		||||
	// clearing unused config to save resources
 | 
			
		||||
	// clearing unused configs to save resources
 | 
			
		||||
	//******************************************
 | 
			
		||||
	for name, conf := range ZabovConfigs {
 | 
			
		||||
		if conf.references == 0 {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
FROM golang:1.14.1 AS builder
 | 
			
		||||
FROM arm64v8/golang:1.15.6 AS builder
 | 
			
		||||
RUN apt install git -y
 | 
			
		||||
RUN mkdir -p /go/src/zabov
 | 
			
		||||
RUN git clone https://git.keinpfusch.net/loweel/zabov /go/src/zabov 
 | 
			
		||||
| 
						 | 
				
			
			@ -17,4 +17,3 @@ COPY --from=builder /go/src/zabov /opt/zabov
 | 
			
		|||
EXPOSE 53/udp
 | 
			
		||||
ENV TZ Europe/Rome
 | 
			
		||||
ENTRYPOINT ["/opt/zabov/zabov"]
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
FROM arm32v7/golang:1.14.1 AS builder
 | 
			
		||||
FROM arm64v8/golang:1.15.6 AS builder
 | 
			
		||||
RUN apt install git -y
 | 
			
		||||
RUN mkdir -p /go/src/zabov
 | 
			
		||||
RUN git clone https://git.keinpfusch.net/loweel/zabov /go/src/zabov 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
FROM arm64v8/golang:1.14.1 AS builder
 | 
			
		||||
FROM arm64v8/golang:1.15.6 AS builder
 | 
			
		||||
RUN apt install git -y
 | 
			
		||||
RUN mkdir -p /go/src/zabov
 | 
			
		||||
RUN git clone https://git.keinpfusch.net/loweel/zabov /go/src/zabov 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										37
									
								
								config.json
								
								
								
								
							
							
						
						
									
										37
									
								
								config.json
								
								
								
								
							| 
						 | 
				
			
			@ -6,28 +6,6 @@
 | 
			
		|||
        "cachettl": 1,
 | 
			
		||||
        "killfilettl": 12
 | 
			
		||||
    },
 | 
			
		||||
    "localresponder":{
 | 
			
		||||
        "responder":"192.168.178.1:53",
 | 
			
		||||
        "localdomain":"fritz.box"
 | 
			
		||||
    },
 | 
			
		||||
    "ipaliases":{
 | 
			
		||||
        "pc8":"192.168.178.29",
 | 
			
		||||
        "localhost":"127.0.0.1"
 | 
			
		||||
    },
 | 
			
		||||
    "ipgroups":[
 | 
			
		||||
        {
 | 
			
		||||
            "ips":["localhost", "::1", "192.168.178.30", "192.168.178.31", "pc8"],
 | 
			
		||||
            "cfg":"",
 | 
			
		||||
            "timetable":"tt_children"
 | 
			
		||||
        }
 | 
			
		||||
    ],
 | 
			
		||||
    "timetables":{
 | 
			
		||||
        "tt_children":{
 | 
			
		||||
            "tables":[{"times":"00:00-05:00;8:30-12:30;18:30-22:59", "days":"Mo;Tu;We;Th;Fr;Sa;Su"}],
 | 
			
		||||
            "cfgin":"children_restricted",
 | 
			
		||||
            "cfgout":"children"
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    "configs":{
 | 
			
		||||
        "default":{
 | 
			
		||||
            "upstream":"./dns-upstream.txt",
 | 
			
		||||
| 
						 | 
				
			
			@ -35,21 +13,6 @@
 | 
			
		|||
            "doublefilters":"./urls-hosts.txt", 
 | 
			
		||||
            "blackholeip":"127.0.0.1",
 | 
			
		||||
            "hostsfile":"./urls-local.txt"
 | 
			
		||||
        },
 | 
			
		||||
        "children":{
 | 
			
		||||
            "upstream":"./dns-upstream.txt",
 | 
			
		||||
            "singlefilters":"./urls-domains.txt",
 | 
			
		||||
            "doublefilters":"./urls-hosts.txt", 
 | 
			
		||||
            "blackholeip":"127.0.0.1",
 | 
			
		||||
            "hostsfile":"./urls-local.txt"
 | 
			
		||||
        },
 | 
			
		||||
        "children_restricted":{
 | 
			
		||||
            "upstream":"./dns-upstream.txt",
 | 
			
		||||
            "singlefilters":"./urls-domains.txt",
 | 
			
		||||
            "doublefilters":"./urls-hosts.txt", 
 | 
			
		||||
            "blackholeip":"127.0.0.1",
 | 
			
		||||
            "hostsfile":"./urls-local.txt"
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,57 @@
 | 
			
		|||
{
 | 
			
		||||
    "zabov":{
 | 
			
		||||
        "port":"53", 
 | 
			
		||||
        "proto":"udp", 
 | 
			
		||||
        "ipaddr":"0.0.0.0",
 | 
			
		||||
        "cachettl": 1,
 | 
			
		||||
        "killfilettl": 12,
 | 
			
		||||
        "debug":"true",
 | 
			
		||||
        "debugdbpath":"./logs",
 | 
			
		||||
        "timetable":""
 | 
			
		||||
    },
 | 
			
		||||
    "localresponder":{
 | 
			
		||||
        "responder":"192.168.1.1:53",
 | 
			
		||||
        "localdomain":".local"
 | 
			
		||||
    },
 | 
			
		||||
    "ipaliases":{
 | 
			
		||||
        "pc8":"192.168.1.2",
 | 
			
		||||
    },
 | 
			
		||||
    "ipgroups":[
 | 
			
		||||
        {
 | 
			
		||||
            "ips":["pc8"],
 | 
			
		||||
            "cfg":"",
 | 
			
		||||
            "timetable":"tt_children"
 | 
			
		||||
        }
 | 
			
		||||
    ],
 | 
			
		||||
    "timetables":{
 | 
			
		||||
        "tt_children":{
 | 
			
		||||
            "tables":[{"times":"9:30-11:30", "days":"Mo;Tu;We;Th;Fr;Sa"}],
 | 
			
		||||
            "cfgin":"children_restricted",
 | 
			
		||||
            "cfgout":"children"
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    "configs":{
 | 
			
		||||
        "default":{
 | 
			
		||||
            "upstream":"./dns-upstream.txt",
 | 
			
		||||
            "singlefilters":"./urls-domains-updated.txt",
 | 
			
		||||
            "doublefilters":"./urls-hosts-normal.txt", 
 | 
			
		||||
            "blackholeip":"127.0.0.1",
 | 
			
		||||
            "hostsfile":"./urls-local-normal.txt"
 | 
			
		||||
        },
 | 
			
		||||
        "children":{
 | 
			
		||||
            "upstream":"./dns-familyscreen.txt",
 | 
			
		||||
            "singlefilters":"./urls-domains-updated.txt",
 | 
			
		||||
            "doublefilters":"./urls-hosts-nofb.txt", 
 | 
			
		||||
            "blackholeip":"127.0.0.1",
 | 
			
		||||
            "hostsfile":"./urls-local-normal.txt"
 | 
			
		||||
        },
 | 
			
		||||
        "children_restricted":{
 | 
			
		||||
            "upstream":"./dns-familyscreen.txt",
 | 
			
		||||
            "singlefilters":"./urls-domains-updated.txt",
 | 
			
		||||
            "doublefilters":"./urls-hosts-nofb.txt", 
 | 
			
		||||
            "blackholeip":"127.0.0.1",
 | 
			
		||||
            "hostsfile":"./urls-local-restricted.txt"
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,12 +1,8 @@
 | 
			
		|||
https://mirror1.malwaredomains.com/files/justdomains
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/adaway.org/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/adblock-nocoin-list/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/adguard-simplified/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/anudeepnd-adservers/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/disconnect.me-ad/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/disconnect.me-malvertising/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/disconnect.me-malware/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/disconnect.me-tracking/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/antipopads/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/digitalside-threat-intel/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easylist/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/easyprivacy/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/eth-phishing-detect/list.txt
 | 
			
		||||
| 
						 | 
				
			
			@ -14,24 +10,28 @@ https://raw.githubusercontent.com/hectorm/hmirror/master/data/fademind-add.2o7ne
 | 
			
		|||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/fademind-add.dead/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/fademind-add.risk/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/fademind-add.spam/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/gfrogeye-firstparty-trackers/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/hostsvn/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/kadhosts/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/malwaredomainlist.com/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/malwaredomains.com-immortaldomains/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/malwaredomains.com-justdomains/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/lightswitch05-ads-and-tracking/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/matomo.org-spammers/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/mitchellkrogza-badd-boyz-hosts/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/pgl.yoyo.org/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/ransomwaretracker.abuse.ch/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/phishing.army/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/socram8888-notonmyshift/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/someonewhocares.org/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/spam404.com/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/stevenblack/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/ublock/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/ublock-abuse/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/ublock-badware/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/ublock-privacy/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/urlhaus/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/winhelp2002.mvps.org/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/zerodot1-coinblockerlists-browser/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/hectorm/hmirror/master/data/zeustracker.abuse.ch/list.txt
 | 
			
		||||
https://raw.githubusercontent.com/CHEF-KOCH/Audio-fingerprint-pages/master/AudioFp.txt
 | 
			
		||||
https://raw.githubusercontent.com/CHEF-KOCH/Canvas-fingerprinting-pages/master/Canvas.txt
 | 
			
		||||
https://raw.githubusercontent.com/CHEF-KOCH/WebRTC-tracking/master/WebRTC.txt
 | 
			
		||||
https://raw.githubusercontent.com/CHEF-KOCH/CKs-FilterList/master/Anti-Corp/hosts/NSABlocklist.txt
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-blocklist.txt
 | 
			
		||||
https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-malware.txt
 | 
			
		||||
https://www.stopforumspam.com/downloads/toxic_domains_whole.txt
 | 
			
		||||
 | 
			
		||||
https://mirror.cedia.org.ec/malwaredomains/immortal_domains.txt
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue