Browse Source

Merge pull request #2706 from dibdot/adblock

adblock: update 1.1.11
lilik-openwrt-22.03
Hannu Nyman 8 years ago
parent
commit
96492d71ad
5 changed files with 11 additions and 11 deletions
  1. +1
    -1
      net/adblock/Makefile
  2. +3
    -4
      net/adblock/files/README.md
  3. +2
    -2
      net/adblock/files/adblock-helper.sh
  4. +3
    -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
PKG_NAME:=adblock
PKG_VERSION:=1.1.10
PKG_VERSION:=1.1.11
PKG_RELEASE:=1
PKG_LICENSE:=GPL-3.0+
PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>


+ 3
- 4
net/adblock/files/README.md View File

@ -67,7 +67,7 @@ A lot of people already use adblocker plugins within their desktop browsers, but
## Prerequisites
* [openwrt](https://openwrt.org), tested with latest stable release (Chaos Calmer) and with current trunk (Designated Driver)
* [LEDE project](https://www.lede-project.org), tested with trunk > r98
* usual openwrt setup with enabled 'iptables', 'dnsmasq' and 'uhttpd' - dump AP modes without these basics are _not_ supported!
* usual setup with enabled 'iptables', 'dnsmasq' and 'uhttpd' - dump AP modes without these basics are _not_ supported!
* additional required software packages:
* wget
* optional: 'kmod-ipt-nat6' for IPv6 support
@ -75,7 +75,7 @@ A lot of people already use adblocker plugins within their desktop browsers, but
## OpenWrt / LEDE trunk Installation & Usage
* install 'adblock' (_opkg install adblock_)
* adblock starts automatically during boot/wan-ifup event, check _logread -e "adblock"_ for adblock related information
* adblock starts automatically during boot, triggered by wan-ifup event, check _logread -e "adblock"_ for adblock related information
* optional: start/restart/stop the adblock service manually with _/etc/init.d/adblock_
* optional: enable/disable your required adblock list sources in _/etc/config/adblock_ - 'adaway', 'disconnect' and 'yoyo' are enabled by default
* optional: maintain the adblock service in luci under 'System => Startup'
@ -106,7 +106,7 @@ A lot of people already use adblocker plugins within their desktop browsers, but
## 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:
* adb\_enabled => main switch to enable/disable adblock service (default: '1', enabled)
* adb\_cfgversion => config version string (do not change!) - adblock will check this entry during startup
* adb\_cfgver => config version string (do not change!) - adblock will check this entry during startup
* adb\_lanif => name of the logical lan interface (default: 'lan')
* adb\_nullport => port of the adblock uhttpd instance (default: '65535')
* adb\_nullipv4 => IPv4 blackhole ip address (default: '192.0.2.1', in AP mode: local router ip)
@ -194,7 +194,6 @@ Queries to ad/abuse domains are never forwarded and always replied with a local
For that purpose adblock uses an ip address from the private 'TEST-NET-1' subnet (192.0.2.1 / ::ffff:c000:0201) by default (in AP mode the local router ip address will be used).
Furthermore all ad/abuse queries will be filtered by ip(6)tables and redirected to internal adblock pixel server (in PREROUTING chain) or rejected (in FORWARD or OUTPUT chain).
All iptables and uhttpd related adblock additions are non-destructive, no hard-coded changes in 'firewall.user', 'uhttpd' config or any other openwrt related config files. There is _no_ adblock background daemon running, the (scheduled) start of the adblock service keeps only the adblock lists up-to-date.
--ifup event
## Support
Please join the adblock discussion in this [openwrt forum thread](https://forum.openwrt.org/viewtopic.php?id=59803) or contact me by mail <dev@brenken.org>


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

@ -120,7 +120,7 @@ f_envload()
# check 'enabled' & 'version' config options
#
if [ -z "${adb_enabled}" ] || [ -z "${adb_cfgversion}" ] || [ "${adb_cfgversion}" != "${adb_scriptver%.*}" ]
if [ -z "${adb_enabled}" ] || [ -z "${adb_cfgver}" ] || [ "${adb_cfgver}" != "${adb_mincfgver}" ]
then
rc=-1
f_log "outdated adblock configuration found, please copy latest version from '/etc/adblock/adblock.conf.default' to '/etc/config/adblock'"
@ -499,7 +499,7 @@ f_cntconfig()
for src_name in $(ls -ASr "${adb_dnsdir}/${adb_dnsprefix}"*)
do
count="$(wc -l < "${src_name}")"
src_name="${src_name#*.}"
src_name="${src_name##*.}"
if [ -n "${adb_wanif4}" ] && [ -n "${adb_wanif6}" ]
then
count=$((count / 2))


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

@ -34,10 +34,11 @@ else
printf "${adb_pid}" > "${adb_pidfile}"
fi
# get current directory and script version
# get current directory and set script/config version
#
adb_scriptdir="${0%/*}"
adb_scriptver="1.1.10"
adb_scriptver="1.1.11"
adb_mincfgver="1.2"
# source in adblock function library
#


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

@ -3,7 +3,7 @@
config adblock 'global'
option adb_enabled '1'
option adb_cfgversion '1.1'
option adb_cfgver '1.2'
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_forcedns '1'
@ -115,7 +115,7 @@ config source 'whocares'
config source 'winspy'
option enabled '0'
option adb_src 'https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/hostsBlockWindowsSpy.txt'
option adb_src 'https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/hosts/hostsBlockWindowsSpy.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_desc 'focus on windows spy & telemetry domains, infrequent updates, approx. 120 entries'


Loading…
Cancel
Save