Adblock support thread

it would be nicer if the reports would be sorted by date and time now it is showing randomly

Already fixed a few minutes ago :wink:
https://github.com/openwrt/packages/commit/1d8d456a55a3135de59731640c58d4c222738036

1 Like

Hi dibdot,

I just tried your adblock and so far so good. One quick question:
Is there a way to suppress the 'webpage not available' messages in mobile? IE. Google news app returns these messages inline (due to adblock doing its job). Switch it to a 1x1 pixel or something?

That doesn't work, you can't redirect SSL-connections to a pixel server.

@dibdot after upgrading to v4 I'm trying to bring over some of the blocklists I had in 3 but after adding the following to adblock.sources files, none of the blocklists are read:

"youtube_mine": {
		"url": "https://api.hackertarget.com/hostsearch/?q=googlevideo.com",
		"rule": "BEGIN{FS=\",\"}/^(r[0-9]+\.){1,1}([[:alnum:]_-]+\.)+[[:alpha:]]+/{sub(/\./,\"---\");print tolower(\$1)}",
		"size": "S",
		"focus": "youtube",
		"descurl": "https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md"
	},
	"ABP_EasyList": {
		"url": "https://easylist-downloads.adblockplus.org/easylist.txt",
		"rule": "BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}",
		"size": "M",
		"focus": "ADB_EaslyList",
		"descurl": "https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md"
	},
	"ABP_EasyPrivacy": {
		"url": "https://easylist-downloads.adblockplus.org/easyprivacy.txt",
		"rule": "BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}",
		"size": "M",
		"focus": "ADB_EaslyPrivacy",
		"descurl": "https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md"
	},
	"adhell_3": {
		"url": "https://getadhell.com/standard-package.txt",
		"rule": "/^127\.0\.0\.1[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}",
		"size": "S",
		"focus": "ads",
		"descurl": "https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md"
	},
	"AdguardDNS": {
		"url": "https://v.firebog.net/hosts/AdguardDNS.txt",
		"rule": "/^([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$1)}",
		"size": "XL",
		"focus": "ads",
		"descurl": "https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md"
	},
	"hostsVN": {
		"url": "https://raw.githubusercontent.com/bigdargon/hostsVN/master/hosts",
		"rule": "/^0\.0\.0\.0[[:space:]]+([[:alnum:]_-]+\.)+[[:alpha:]]+([[:space:]]|$)/{print tolower(\$2)}",
		"size": "L",
		"focus": "ads",
		"descurl": "https://github.com/openwrt/packages/blob/master/net/adblock/files/README.md"
	}

Am I missing something?

@dibdot how to use "Filter criteria like date, domain or client (optional)" field when refreshing DNS report? How to specify a date, or client, I mean in which format?

Just copy & paste (parts of) client, domain, date or time info ins this field and filter for it, e.g.:
unfiltered

filter criteria, in this example a certain domain
filter2

filtered output

1 Like

Yep, your regex escaping looks wrong, e.g.:

yours:
"rule": "BEGIN{FS=\"[|^]\"}/^\|\|([^([:space:]|#|\*|\/).]+\.)+[[:alpha:]]+\^("\\\$third-party")?$/{print tolower(\$3)}",
correct example with valid "\" escaping:
"rule": "BEGIN{FS=\"[|^]\"}/^\\|\\|([[:alnum:]_-]+\\.)+[[:alpha:]]+\\^(\\$third-party)?$/{print tolower($3)}",

BTW, adguard and VN are already included (see "adguard" and "reg_vn"), "easylist" is also part of many of the reg_* lists ...

Edit: adhell looks pretty unmaintained, the list was last updated 3 years ago.

People still having trouble with reports not working?? I'm on version 4.0.4 included on the latest hnyman master builds, tcpdumpmini is installed but I get no reports even though adblock works great still. I've tried stopping and restarting adblock, and rebooting the router. It stays blank. It's been working on earlier 4.0+ builds.

Please follow these instructions (Adblock support thread). Also please start /etc/init.d/adblock report on the CLI, check that a tcpdump process is running and that you have a least one filled/growing *.pcap file in your report directory (/tmp by default).

Is it for future updates important that the source name is smarttv or does an update add missing config by the adb_src (and remove it if an entry is no longer available)?

when I enter "iphone" - it shows nothing.
when I enter "*iphone" - it shows results

I doubt that, the criteria input field didn't accept any wildcards.

What you're trying to achieve? The source name (adb_sources) must match the JSON object in /etc/adblock/adblock.sources.gz), otherwise the source is read over.

that's good.
I play around with the config file but I hope to have it in a way that If the config file get an update. I do not get problems with.

It is broken in luci.
It works with the command line when i Enter /etc/init.d/adblock report MEDIABOX i get right answer (only mediabox queries), when i enter it in luci I get everything.

Ok, propably i had some old report.js file for luci, after downloading it from github and restarting router it works fine.

edit.

still there must be some bug.
Now it shows queries for some devices, for some other shows 0.
Even tho I'm doing copy paste the name from the top10 statistics.

example:
in command line /etc/init.d/adblock report Galaxy-S9
works

in luci entering Galaxy-S9 in refresh -> filter criteria - I get 0 results

2 second later another try in command line and still success

That's quite normal for statistics based on rolling pcap files.

look for my edited answer: it works in command line, it doesnt work in luci

Not reproducible - send me your pcap file - thanks.

I cant send it to you right now, but:
I inserted alert(search) after var search = document.getElementById('search').value.trim().replace(/[^a-z0-9.-:]/g,'') || '+';

when I enter Galaxy-S9, alert shows "alaxy-9"
when I enter MEDIABOX, alert shows "+"

so its because capital letters

should be

var search = document.getElementById('search').value.trim().replace(/[^a-zA-Z0-9.-:]/g,'') || '+';