Browse Source

Merge pull request #2736 from dibdot/adblock

adblock: update 1.1.12
lilik-openwrt-22.03
Hannu Nyman 9 years ago
parent
commit
2a05c1b0fe
5 changed files with 50 additions and 24 deletions
  1. +1
    -1
      net/adblock/Makefile
  2. +44
    -18
      net/adblock/files/README.md
  3. +1
    -1
      net/adblock/files/adblock-helper.sh
  4. +2
    -2
      net/adblock/files/adblock-update.sh
  5. +2
    -2
      net/adblock/files/adblock.conf

+ 1
- 1
net/adblock/Makefile View File

@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=adblock PKG_NAME:=adblock
PKG_VERSION:=1.1.11
PKG_VERSION:=1.1.12
PKG_RELEASE:=1 PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+ PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org> PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>


+ 44
- 18
net/adblock/files/README.md View File

@ -39,7 +39,7 @@ A lot of people already use adblocker plugins within their desktop browsers, but
* => weekly updates, approx. 12.000 entries * => weekly updates, approx. 12.000 entries
* [winhelp](http://winhelp2002.mvps.org) * [winhelp](http://winhelp2002.mvps.org)
* => infrequent updates, approx. 15.000 entries * => infrequent updates, approx. 15.000 entries
* [winspy](https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/hostsBlockWindowsSpy.txt)
* [winspy](https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/hosts/windows10_spy.txt)
* => infrequent updates, approx. 120 entries * => infrequent updates, approx. 120 entries
* [yoyo](http://pgl.yoyo.org/adservers) * [yoyo](http://pgl.yoyo.org/adservers)
* => weekly updates, approx. 2.500 entries (enabled by default) * => weekly updates, approx. 2.500 entries (enabled by default)
@ -102,6 +102,7 @@ A lot of people already use adblocker plugins within their desktop browsers, but
* **new list sources:** you could add new blocklist sources on your own via uci config, all you need is a source url and an awk one-liner (see example below) * **new list sources:** you could add new blocklist sources on your own via uci config, all you need is a source url and an awk one-liner (see example below)
* **AP mode:** in AP mode adblock uses automatically the local router ip as nullip address. To make sure that your LuCI interface will be still accessible, please change the local uhttpd instance to ports <> 80/443 (see example below) * **AP mode:** in AP mode adblock uses automatically the local router ip as nullip address. To make sure that your LuCI interface will be still accessible, please change the local uhttpd instance to ports <> 80/443 (see example below)
* **debugging:** for script debugging please change the 'DEBUG' variable in the header of _/usr/bin/adblock-update.sh_ from '0' to '1' and start this script directly (without any parameters) * **debugging:** for script debugging please change the 'DEBUG' variable in the header of _/usr/bin/adblock-update.sh_ from '0' to '1' and start this script directly (without any parameters)
* **disable active dns probing in windows:** to prevent a possible yellow exclamation mark on your internet connection icon (which wrongly means connected, but no internet), please change the following registry key/value from "1" to "0" _HKLM\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet\EnableActiveProbing_
## Further adblock config options ## Further adblock config options
* usually the adblock autodetection works quite well and no manual config overrides are needed, all options apply to the 'global' config section: * usually the adblock autodetection works quite well and no manual config overrides are needed, all options apply to the 'global' config section:
@ -126,29 +127,29 @@ A lot of people already use adblocker plugins within their desktop browsers, but
**example blacklist entry (/etc/adblock/adblock.blacklist):** **example blacklist entry (/etc/adblock/adblock.blacklist):**
<pre><code> <pre><code>
ads.example.com ads.example.com
This rule blocks:
http://ads.example.com/foo.gif
http://server1.ads.example.com/foo.gif
https://ads.example.com:8000/
This rule doesn't block:
http://ads.example.com.ua/foo.gif
http://example.com/
</code></pre> </code></pre>
This rule blocks:
http://ads.example.com/foo.gif
http://server1.ads.example.com/foo.gif
https://ads.example.com:8000/
This rule doesn't block:
http://ads.example.com.ua/foo.gif
http://example.com/
**example whitelist entry (/etc/adblock/adblock.whitelist):** **example whitelist entry (/etc/adblock/adblock.whitelist):**
<pre><code> <pre><code>
analytics.com analytics.com
This rule removes _all_ domains from the blocklists with this string in it, i.e.:
google-analytics.com
ssl.google-analytics.com
api.gameanalytics.com
photos.daily-deals.analoganalytics.com
adblockanalytics.com
</code></pre> </code></pre>
This rule removes _all_ domains from the blocklists with this string in it, i.e.:
google-analytics.com
ssl.google-analytics.com
api.gameanalytics.com
photos.daily-deals.analoganalytics.com
adblockanalytics.com
**example uhttpd configuration in AP mode:** **example uhttpd configuration in AP mode:**
<pre><code> <pre><code>
# configuration found in /etc/config/uhttpd # configuration found in /etc/config/uhttpd
@ -159,12 +160,37 @@ config uhttpd 'main'
list listen_https '0.0.0.0:445' list listen_https '0.0.0.0:445'
</code></pre> </code></pre>
**example grep for blocked (sub-)domains in adblock source files:**
<pre><code>
grep "google-analytics.com" "/tmp/dnsmasq.d/adb_list"*
This will output all matches with corresponding source files:
/tmp/dnsmasq.d/adb_list.winhelp:address=/ssl.google-analytics.com/192.0.2.1
/tmp/dnsmasq.d/adb_list.winhelp:address=/www.google-analytics.com/192.0.2.1
/tmp/dnsmasq.d/adb_list.yoyo:address=/google-analytics.com/192.0.2.1
</code></pre>
**example to find blocked domains on certain sites for whitelisting:**
<pre><code>
1. the easy way ...
enable the network analysis builtins in chrome or firefox to identify domains
which are redirected to the adblock null-ip (default 192.0.2.1), add these domains to your whitelist
2. a bit harder ...
enable 'Log queries' in the dnsmasq configuration (via LuCI Network => DHCP/DNS),
ssh to your router and start tracing with 'logread -f -e "dnsmasq" -e "192.0.2.1"'
switch to your client, access the relevant site and check all domains
that are blocked/listed in logread, add these domains to your whitelist
=> finally restart the adblock service (/etc/init.d/adblock restart) in both variants
</code></pre>
**example to add a new blocklist source:** **example to add a new blocklist source:**
<pre><code> <pre><code>
1. the easy way ... 1. the easy way ...
example: https://easylist-downloads.adblockplus.org/rolist+easylist.txt example: https://easylist-downloads.adblockplus.org/rolist+easylist.txt
adblock already supports an easylist source, called 'ruadlist'. To add the additional local easylist adblock already supports an easylist source, called 'ruadlist'. To add the additional local easylist
as a new source, copy the existing config source 'ruadlist' section and change only
as a new source, copy the existing config source 'ruadlist' section and change only
the source name, the url and the description - that's all! the source name, the url and the description - that's all!
config source 'rolist' config source 'rolist'


+ 1
- 1
net/adblock/files/adblock-helper.sh View File

@ -115,7 +115,7 @@ f_envload()
adb_uci="$(which uci)" adb_uci="$(which uci)"
adb_iptv4="$(which iptables)" adb_iptv4="$(which iptables)"
adb_iptv6="$(which ip6tables)" adb_iptv6="$(which ip6tables)"
adb_fetch="$(which wget-ssl)"
adb_fetch="$(which wget)"
unset adb_srclist adb_revsrclist adb_errsrclist unset adb_srclist adb_revsrclist adb_errsrclist
# check 'enabled' & 'version' config options # check 'enabled' & 'version' config options


+ 2
- 2
net/adblock/files/adblock-update.sh View File

@ -37,8 +37,8 @@ fi
# get current directory and set script/config version # get current directory and set script/config version
# #
adb_scriptdir="${0%/*}" adb_scriptdir="${0%/*}"
adb_scriptver="1.1.11"
adb_mincfgver="1.2"
adb_scriptver="1.1.12"
adb_mincfgver="1.3"
# source in adblock function library # source in adblock function library
# #


+ 2
- 2
net/adblock/files/adblock.conf View File

@ -3,7 +3,7 @@
config adblock 'global' config adblock 'global'
option adb_enabled '1' option adb_enabled '1'
option adb_cfgver '1.2'
option adb_cfgver '1.3'
option adb_whitelist '/etc/adblock/adblock.whitelist' option adb_whitelist '/etc/adblock/adblock.whitelist'
option adb_whitelist_rset '\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\$1)}' option adb_whitelist_rset '\$1 ~/^([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\$1)}'
option adb_forcedns '1' option adb_forcedns '1'
@ -115,7 +115,7 @@ config source 'whocares'
config source 'winspy' config source 'winspy'
option enabled '0' option enabled '0'
option adb_src 'https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/hosts/hostsBlockWindowsSpy.txt'
option adb_src 'https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/hosts/windows10_spy.txt'
option adb_src_rset '\$0 ~/^0\.0\.0\.0[ \t]+([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\$2)}' option adb_src_rset '\$0 ~/^0\.0\.0\.0[ \t]+([A-Za-z0-9_-]+\.){1,}[A-Za-z]+/{print tolower(\$2)}'
option adb_src_desc 'focus on windows spy & telemetry domains, infrequent updates, approx. 120 entries' option adb_src_desc 'focus on windows spy & telemetry domains, infrequent updates, approx. 120 entries'


Loading…
Cancel
Save