adblock: update 4.0.5-3
authorDirk Brenken <dev@brenken.org>
Sat, 30 May 2020 04:10:59 +0000 (06:10 +0200)
committerDirk Brenken <dev@brenken.org>
Sat, 30 May 2020 04:10:59 +0000 (06:10 +0200)
* fix oisd_nl source parser (format has been changed)
* enable safesearch support for kresd (ip based)

Signed-off-by: Dirk Brenken <dev@brenken.org>
net/adblock/Makefile
net/adblock/files/adblock.sh
net/adblock/files/adblock.sources

index 5e32dc83eb02edf0199ee0b0f756c49521fb0258..a706fec05a457c71329c1f12afe373df1f0b0ac1 100644 (file)
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=adblock
 PKG_VERSION:=4.0.5
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
 
index ae208a00071626b42b5a8de8eea040e7b1a2e802..107ce4027c73a3581173e52a9ac1b257c52ad37d 100755 (executable)
@@ -252,7 +252,7 @@ f_dns()
                                adb_dnsheader="${adb_dnsheader:-"\$TTL 2h\n@ IN SOA localhost. root.localhost. (1 6h 1h 1w 2h)\n"}"
                                adb_dnsdeny="${adb_dnsdeny:-"${adb_awk} '{print \"\"\$0\" CNAME .\\n*.\"\$0\" CNAME .\"}'"}"
                                adb_dnsallow="${adb_dnsallow:-"${adb_awk} '{print \"\"\$0\" CNAME rpz-passthru.\\n*.\"\$0\" CNAME rpz-passthru.\"}'"}"
-                               adb_dnssafesearch="${adb_dnssafesearch:-"0"}"
+                               adb_dnssafesearch="${adb_dnssafesearch:-"${adb_awk} -v item=\"\$item\" '{type=\"AAAA\";if(match(item,/^([0-9]{1,3}\.){3}[0-9]{1,3}$/)){type=\"A\"}}{print \"\"\$0\" \"type\" \"item\"\"}'"}"
                                adb_dnsstop="${adb_dnsstop:-"* CNAME ."}"
                        ;;
                        "raw")
@@ -782,7 +782,7 @@ f_list()
                        if [ "${out_rc}" -eq 0 ]
                        then
                                > "${adb_tmpdir}/tmp.safesearch.${src_name}"
-                               if [ "${adb_dns}" = "named" ] || [ "${adb_dns}" = "kresd" ]
+                               if [ "${adb_dns}" = "named" ]
                                then
                                        array="${safe_cname}"
                                else
index 5d9570d28686c5e9cbfb1993507660041829290d..1a8a2b11d5aec98c6988efd9cf64e105a4b2ce56 100644 (file)
        },
        "oisd_nl": {
                "url": "https://dbl.oisd.nl",
-               "rule": "/^([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($1)}",
+               "rule": "/^0\\.0\\.0\\.0[[:space:]]+([[:alnum:]_-]{1,63}\\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower($2)}",
                "size": "XXL",
                "focus": "general",
                "descurl": "https://oisd.nl"