Page 1 of 2

Adblock plugin blocklist disappeared

Posted: Sat Sep 05, 2020 5:34 pm
by agent24
I am running Gargoyle 1.11.0 (since it was released) with the adblock plugin.

Everything was working previously until a couple of days ago, I noticed ads in YouTube and today went to check adblock, turned out the blocklist is empty.

I tried to update the list, but while the timestamp says it has been updated just then, nothing gets added! Very strange.

Re: Adblock plugin blocklist disappeared

Posted: Sat Sep 05, 2020 5:59 pm
by agent24
I see 1.12 was released since I last visited - upgraded and reset settings.

Installed adblock again, still the same problem.

Re: Adblock plugin blocklist disappeared

Posted: Sat Sep 05, 2020 6:24 pm
by Lantis
Could you provide a log please?
In any case, YouTube ads are not blocked well anymore as they are served from the same domain as the videos themselves.

Re: Adblock plugin blocklist disappeared

Posted: Sat Sep 05, 2020 11:17 pm
by agent24
I logged into SSH, ran the update blocklist again. The last messages are as shown.

Seems it can't download the file for some reason, but I don't know why. Obviously my connection works or I can't post this.
Sun Sep 6 15:12:37 2020 authpriv.notice dropbear[14765]: Password auth succeeded for 'root' from 192.168.0.4:53199
Sun Sep 6 15:13:20 2020 user.notice ADBLOCK: Modifying black/white lists from GUI
Sun Sep 6 15:13:20 2020 daemon.err uhttpd[13179]: uci: Entry not found
Sun Sep 6 15:13:20 2020 user.notice ADBLOCK: Removing old hosts file
Sun Sep 6 15:13:20 2020 user.notice ADBLOCK: Retrieving ad lists from remote source
Sun Sep 6 15:13:22 2020 user.notice ADBLOCK: Retrieve remote ad list failed. Check connection
Sun Sep 6 15:13:22 2020 user.notice ADBLOCK: Adding entries from black.list
Sun Sep 6 15:13:22 2020 user.notice ADBLOCK: Removing entries from white.list
Sun Sep 6 15:13:22 2020 user.notice ADBLOCK: Reloading hosts list
Sun Sep 6 15:13:22 2020 daemon.info dnsmasq[13141]: read /etc/hosts - 3 addresses
Sun Sep 6 15:13:22 2020 daemon.info dnsmasq[13141]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Sun Sep 6 15:13:22 2020 daemon.info dnsmasq[13141]: read /plugin_root/adblock/block.hosts - 1 addresses
Sun Sep 6 15:13:22 2020 daemon.info dnsmasq-dhcp[13141]: read /etc/ethers - 1 addresses

Re: Adblock plugin blocklist disappeared

Posted: Sun Sep 06, 2020 3:14 am
by Lantis
please run the following

Code: Select all

ewget http://winhelp2002.mvps.org/hosts.txt
Let me know if you get an ad list or an error, and provide the error back here if that is the case please.

Re: Adblock plugin blocklist disappeared

Posted: Sun Sep 06, 2020 4:05 am
by RomanHK
Yes, I confirm. The Adblock script is no longer usable.

This resource is no longer working and will no longer work: http://www.mvps.org/winhelp2002/hosts.txt
It is replaced by this source: http://winhelp2002.mvps.org/hosts.txt

Quick fix:
edit the /usr/lib/adblock/runadblock.sh file and correct line 105 as follows:

Code: Select all

wget --no-check-certificate -qO- http://winhelp2002.mvps.org/hosts.txt | awk -v r="$ENDPOINT_IP4" '{sub(/^0.0.0.0/, r)} $0 ~ "^"r' > /tmp/block.build.list
I've tried it, it works.


I also ask the developers (like @Lantis) to fix the script, thank you in advance.

Re: Adblock plugin blocklist disappeared

Posted: Sun Sep 06, 2020 5:17 am
by Lantis
Right, i didn't check 1.12.
It has already been fixed in 1.13 since November 2019. I'll backport the same fix to 1.12.x when i have time.

The described fix is your best and quickest resolution. Thanks.

Re: Adblock plugin blocklist disappeared

Posted: Sun Sep 06, 2020 9:44 am
by agent24
Thanks! That does indeed seem to work. :)

I did notice that there was already a second entry for downloading a hosts file, which didn't work either:

Code: Select all

	wget -qO- http://www.mvps.org/winhelp2002/hosts.txt| awk -v r="$ENDPOINT_IP4" '{sub(/^0.0.0.0/, r)} $0 ~ "^"r' > /tmp/block.build.list
        wget -qO- "http://adaway.org/hosts.txt"|awk -v r="$ENDPOINT_IP4" '{sub(/^127.0.0.1/, r)} $0 ~ "^"r' >> /tmp/block.build.list
When trying to download manually I got a 301 error. I could download it with Firefox which redirected to https version. I changed that and had to add the --no-check-certificate switch too.

My current script now has these lines:

Code: Select all

        wget --no-check-certificate -qO- http://winhelp2002.mvps.org/hosts.txt | awk -v r="$ENDPOINT_IP4" '{sub(/^0.0.0.0/, r)} $0 ~ "^"r' > /tmp/block.build.list
        #wget -qO- http://www.mvps.org/winhelp2002/hosts.txt | awk -v r="$ENDPOINT_IP4" '{sub(/^0.0.0.0/, r)} $0 ~ "^"r' > /tmp/block.build.list
        wget --no-check-certificate -qO- https://adaway.org/hosts.txt | awk -v r="$ENDPOINT_IP4" '{sub(/^127.0.0.1/, r)} $0 ~ "^"r' >> /tmp/block.build.list
which gets me back to the 15,000+ blocklist entries I recall having before. Yay!

Re: Adblock plugin blocklist disappeared

Posted: Tue Sep 08, 2020 4:52 pm
by CBx86
Gargoyle Version:1.12.X (Built 20200610-0028 git@80899c80)
Model:NETGEAR WNDR4300

Default:

Code: Select all

wget -qO- http://www.mvps.org/winhelp2002/hosts.txt| awk -v r="$ENDPOINT_IP4" '{sub(/^0.0.0.0/, r)} $0 ~ "^"r' > /tmp/block.build.list
wget -qO- "http://adaway.org/hosts.txt"|awk -v r="$ENDPOINT_IP4" '{sub(/^127.0.0.1/, r)} $0 ~ "^"r' >> /tmp/block.build.list

Re: Adblock plugin blocklist disappeared

Posted: Mon Oct 05, 2020 2:08 am
by Lantis
I have backported the fix to the 1.12.x branch now. Any new builds on that branch should be ok.