aboutsummaryrefslogtreecommitdiff
path: root/net/adblock/files/etc/adblock/adblock.conf
blob: 6b2e0cc2cf30cb8ae7661aa073486e1865f83ed4 (plain)
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
108
109
110
111
112
113
114
115
116
117
118
###################################################
# adblock configuration used by adblock-update.sh #
# written by Dirk Brenken (dirk@brenken.org)      #
###################################################

# adblock ip address and device information
# adb_ip  => ip address of the local adblock loopback interface/uhttpd instance
# adb_dev => name of the physical adblock network device
# adb_if  => name of the adblock network interface and uhttpd instance
#
adb_ip="192.168.2.1"
adb_dev="eth0"
adb_if="adblock"

# backup file and default restore message
# backup_dir  => full path to directory for logging and backups, an empty entry disables this feature
# backup_file => full path to backup file
# restore_msg => default restore message
#
backup_dir=""
backup_file="${backup_dir}/adlist.backup"
restore_msg="unknown error"

# wan/update interface(s)
# wan_dev => space separated list of devices that are allowed for adblock updates (check /sys/class/net/<dev>),
#            an empty entry disables this feature
#
wan_dev=""

# local adblock black & white list for manual overrides
# adb_blacklist => full path to domain blacklist file
# adb_whitelist => full path to domain whitelist file
#
adb_blacklist="/etc/adblock/adblock.blacklist"
adb_whitelist="/etc/adblock/adblock.whitelist"

# error logfile
# log_file => full path to additional logfile for error logging,
#             "/dev/stdout" redirect errors to console, an empty entry disables this feature
#             this feature requires ntp time sync too (see below)
#
log_file="${backup_dir}/error.log"

# domain query logfile
# query_file    => full path to additional domain query logfile,
#                  an empty entry or an empty backup_dir entry disables this feature
# query_history => delete query logfiles older than n days (req. busybox find with mtime support)
#
query_file="${backup_dir}/query.log"
query_history=1
query_name="$(printf "${query_file}" | sed 's/.*\///g')"
query_ip="$(printf "${adb_ip}" | sed 's/\./\\./g')"
query_pid="/var/run/query.pid"

# ntp time server pool
# ntp_srv => space separated list of ntp serverpools, an empty entry disables this feature
#
ntp_srv="ntp0.fau.de ntp1.fau.de ntp2.fau.de ntp3.fau.de"

# domain for nslookup probe
# check_domain => check the newly generated domain blocklist with this domain
#
check_domain="heise.de"

# set startup counter and download timeout defaults
# max_cnt  => wait n seconds/loops for wan & ntp check in sum
# max_time => wait n seconds for every source download
#
cnt=0
max_cnt=30
max_time=60

# minimum values for environment checks
# min_release => minimum required openwrt release number
# min_space   => minimum required space for backups & logfiles (in kbyte)
#
min_release=47025
min_space=100000

# shallalist url, categories and local naming
# shalla_cat => space separated list of categories to use from shallalist archive
#
shalla_cat="adv costtraps downloads spyware tracker warez"
shalla_url="http://www.shallalist.de/Downloads/shallalist.tar.gz"
shalla_archive="${tmp_dir}/shallalist.tar.gz"
shalla_file="${tmp_dir}/shallalist.txt"

# remote and local domain block list sources
# adb_source => comment out sources you don't want to use
#
unset adb_source
adb_source="${adb_source} http://pgl.yoyo.org/adservers/serverlist.php?hostformat=one-line&showintro=0&mimetype=plaintext&ruleset=yoyo"
#adb_source="${adb_source} http://mirror1.malwaredomains.com/files/justdomains&ruleset=default"
#adb_source="${adb_source} https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist&ruleset=default"
#adb_source="${adb_source} https://feodotracker.abuse.ch/blocklist/?download=domainblocklist&ruleset=default"
#adb_source="${adb_source} https://palevotracker.abuse.ch/blocklists.php?download=domainblocklist&ruleset=default"
#adb_source="${adb_source} http://www.dshield.org/feeds/suspiciousdomains_Low.txt&ruleset=default"
#adb_source="${adb_source} file:///${shalla_file}&ruleset=shalla"
#adb_source="${adb_source} http://spam404bl.com/spam404scamlist.txt&ruleset=spam404"
#adb_source="${adb_source} http://winhelp2002.mvps.org/hosts.txt&ruleset=winhelp"
adb_source="${adb_source} file://${adb_blacklist}&ruleset=default"

# adblock source ruleset definitions
# note: please keep the default settings below
#
rset_start="sed -r 's/[[:space:]]|[\[!#/:;_].*|[0-9\.]*localhost//g; s/[\^#/:;_\.\t ]*$//g'"
rset_end="sed '/^[#/:;_\s]*$/d'"
rset_default="${rset_start} | ${rset_end}"
rset_yoyo="${rset_start} | sed 's/,/\n/g' | ${rset_end}"
rset_shalla="${rset_start} | sed 's/\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}$//g' | ${rset_end}"
rset_spam404="${rset_start} | sed 's/^\|\|//g' | ${rset_end}"
rset_winhelp="${rset_start} | sed 's/\([0-9]\{1,3\}\.\)\{3\}[0-1]\{1,1\}//g' | ${rset_end}"

# dnsmasq destination file and format
# note: please keep the default settings below
#
dns_file="/tmp/dnsmasq.d/adlist.conf"
dns_format="sed 's/^/address=\//;s/$/\/'${adb_ip}'/'"