This repository has been archived by the owner on Aug 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdefaults.go
107 lines (94 loc) · 4.31 KB
/
defaults.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/*
* Copyright 2018 - 2020 Christian Müller <dev@c-mueller.xyz>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package ads
import (
"net"
"time"
)
var defaultBlacklists = []string{
"https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts",
"https://mirror1.malwaredomains.com/files/justdomains",
"http://sysctl.org/cameleon/hosts",
"https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist",
"https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt",
"https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt",
}
var strictDefaultBlacklists = []string{
"https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts",
"https://mirror1.malwaredomains.com/files/justdomains",
"http://sysctl.org/cameleon/hosts",
"https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt",
"https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt",
"https://reddestdream.github.io/Projects/MinimalHosts/etc/MinimalHostsBlocker/minimalhosts",
"https://raw.githubusercontent.com/StevenBlack/hosts/master/data/KADhosts/hosts",
"https://raw.githubusercontent.com/StevenBlack/hosts/master/data/add.Spam/hosts",
"https://v.firebog.net/hosts/static/w3kbl.txt",
"https://v.firebog.net/hosts/BillStearns.txt",
"https://www.dshield.org/feeds/suspiciousdomains_Low.txt",
"https://www.dshield.org/feeds/suspiciousdomains_Medium.txt",
"https://www.dshield.org/feeds/suspiciousdomains_High.txt",
"https://www.joewein.net/dl/bl/dom-bl-base.txt",
"https://raw.githubusercontent.com/matomo-org/referrer-spam-blacklist/master/spammers.txt",
"https://hostsfile.org/Downloads/hosts.txt",
"https://someonewhocares.org/hosts/zero/hosts",
"https://raw.githubusercontent.com/Dawsey21/Lists/master/main-blacklist.txt",
"https://raw.githubusercontent.com/vokins/yhosts/master/hosts",
"https://hostsfile.mine.nu/hosts0.txt",
"https://list.kwbt.de/fritzboxliste.txt",
"https://adaway.org/hosts.txt",
"https://v.firebog.net/hosts/AdguardDNS.txt",
"https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt",
"https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt",
"https://v.firebog.net/hosts/Easylist.txt",
"https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts;showintro=0",
"https://raw.githubusercontent.com/StevenBlack/hosts/master/data/UncheckyAds/hosts",
"https://www.squidblacklist.org/downloads/dg-ads.acl",
"https://v.firebog.net/hosts/Easyprivacy.txt",
"https://v.firebog.net/hosts/Prigent-Ads.txt",
"https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-blocklist.txt",
"https://raw.githubusercontent.com/StevenBlack/hosts/master/data/add.2o7Net/hosts",
"https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt",
"https://zerodot1.gitlab.io/CoinBlockerLists/hosts",
"http://www.malwaredomainlist.com/hostslist/hosts.txt",
"http://www.malwaredomainlist.com/hostslist/delisted.txt",
"https://raw.github.com/jonschipp/mal-dnssearch/master/mandiant_apt1.dns",
}
var strictDefaultWhitelists = []string{
"https://raw.github.com/c-mueller/ads/master/lists/strict-whitelist.txt",
}
const defaultIPv4ResolutionIP = "127.0.0.1"
const defaultIPv6ResolutionIP = "::1"
var defaultConfigWithoutRules = adsPluginConfig{
BlacklistURLs: []string{},
WhitelistURLs: []string{},
BlacklistFiles: []string{},
WhitelistFiles: []string{},
BlacklistRules: []string{},
WhitelistRules: []string{},
RegexBlacklistRules: []string{},
RegexWhitelistRules: []string{},
TargetIP: net.ParseIP(defaultIPv4ResolutionIP),
TargetIPv6: net.ParseIP(defaultIPv6ResolutionIP),
HttpListRenewalInterval: time.Hour * 24,
FileListRenewalInterval: time.Minute,
ListRenewalRetryCount: 5,
ListRenewalRetryInterval: time.Minute,
ListPersistencePath: "",
EnableLogging: false,
EnableAutoUpdate: true,
EnableListPersistence: false,
WriteNXDomain: false,
}