hl2guide / Filterlist-for-AdGuard-or-PiHole

A very aggressive filter-list that consolidates over 370 lists for use in AdGuard Home, Pi-Hole or similar.
MIT License
372 stars 52 forks source link

whitelist is in wrong format, needs a fix #64

Closed kzshantonu closed 3 years ago

kzshantonu commented 3 years ago

It seems like the list is supposed to be of domain.tld and *.domain.tld. But @@|| automatically allow subdomains too. So for example, @@||youtube.com (currently in the list) will whitelist everything.youtube.com. Here's a guide for adblock syntax. So in a nutshell (from what I can understand) @@domain.tld for domain.tld only and @@||domain.tld for anything.domain.tld.

PS: keep up the good work. Oh and my testing was on adguard home

hl2guide commented 3 years ago

okay, I'll review this.

hl2guide commented 3 years ago

I've reviewed this and it seems fine to me.

e.g.:

@@||wikimedia.org^$important

for the above:

@@ means "allow" || means match beginning ^ means match end <== VITAL $important means take priority over other rules

I'll do a few more checks later today to see that it's taking affect like I infer it does.

kzshantonu commented 3 years ago

I can confirm @@||domain.tld whitelists all subdomains too. It's mentioned on the AdGuard's syntax guide that I linked on my first comment

brave_ElHzehaODu
kzshantonu commented 3 years ago

@hl2guide mentioning in case you missed it. Regards

hl2guide commented 3 years ago

Only just read that now, I don't know why they'd use ^ as just an end mark and not a matcher.

I'll check this in the next few days and then make adjustments if needed.

For the sonos.com example I visited: https://www.sonos.com/en-au/home

kzshantonu commented 3 years ago

@hl2guide The sonos example is my speakers pinging the metrics server every few minutes. I don't have an URL. I added that custom rule as an example to show how dangerous @@||domain.tld^$important can be. I suggest splitting your allowlist into 2. One with just the domains like this one (well-known allowlist used by many). This is safe and ADH will only allow exact matches. And second one in adblock syntax that adguard expects. Anything with wildcard should go into the second one. You'll have to use regex in this one to accomplish proper, safe and intentional whitelisting. I'm not qualified enough for regex but this should be a good place to start. The blocklists are okay and they block as intended. It's just the whitelist. The goal is to not accidentally whitelist 'too much'

hl2guide commented 3 years ago

fair points. i'll look this over for the next few days and then update the whitelist within 3 days.

hl2guide commented 3 years ago

Uploaded initial fix for this. I'll be making more changes to it over the next few days.

kzshantonu commented 3 years ago

Great I'll add it to my ADH and see what's up