-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add $denyallow modifier support #2923
Comments
See the modifier description here: AdguardTeam/AdGuardHome#2923
Merge in DNS/urlfilter from denyallow to master Squashed commit of the following: commit 2da9fe5 Merge: 067508d a2e2c86 Author: Andrey Meshkov <am@adguard.com> Date: Mon Apr 26 15:51:54 2021 +0300 Merge branch 'master' into denyallow commit 067508d Author: Andrey Meshkov <am@adguard.com> Date: Mon Apr 26 15:49:18 2021 +0300 fix review comments commit 405d8ed Author: Andrey Meshkov <am@adguard.com> Date: Mon Apr 26 15:42:43 2021 +0300 Added priority test commit 04195dd Author: Andrey Meshkov <am@adguard.com> Date: Mon Apr 26 15:38:17 2021 +0300 Allow TLD in and commit a616ee4 Author: Andrey Meshkov <am@adguard.com> Date: Mon Apr 26 15:22:23 2021 +0300 Added $denyallow modifier See the modifier description here: AdguardTeam/AdGuardHome#2923
It seems like this is fully merged and documented, so I'll close the issue. |
Just recently installed in docker to trial AdguardHome. Have to say superb, everything appears to be working as intended but don't know if this new addition is working as intended or I am adding the entry wrong. I am having issues trying to use this feature as resolving stops entirely once adding the below rule. I was on the understanding that if I added the below, any other TLD (such as .cn) that isn't listed below would be blocked AND would also block any subdomains that were in blocklists that were found in the below TLD's? *$denyallow=au|ca|cc|ch|co|de|eu|fm|fr|gg|gl|im|io|it|lt|ly|me|ms|nl|nz|sk|tk|to|tv|uk|us Applying this rule and using the "Check the filtering" query:
It appears the above works but resolving just simply stops until the rule is removed.
|
Uh, I see the issue with it, nice bug. The problem is that the rule is also applied to IP addresses in the responses and blocks them: |
Hi ameshkov, I added your temporary fix which works but how come the server name now shows as unknown? Without the rule, the hostname then shows again. Also, I can't have dual rules as this also appears to break dns resolution. Reason it would be nice is so I can add different lines for different TLD categories. @@/^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$/
|
Well, these are two different rules with their different scopes, that's how it works.
Tbh, no idea, I always thought this is some kind of a Windows-specific issue with nslookup. |
Merge in DNS/adguard-home from 2981-fix-dnsrewrite to master Closes AdguardTeam#2981. Updates AdguardTeam#2923. Squashed commit of the following: commit 578754d Author: Eugene Burkov <e.burkov@adguard.com> Date: Fri Apr 23 17:07:24 2021 +0300 all: upd urlfilter
This issue explains the need for it:
#2917
Here's the spec on
$denyallow
in content blockers: AdguardTeam/CoreLibs#1304 (comment)@ainar-g I've assigned it to v0.106.0 since I am going to implement it myself, it shouldn't slow down the release.
See the spec below.
denyallow
(Since v0.106.0.)
You can use the
$denyallow
modifier to exclude domains from the blocking rule. To add multiple domains to one rule, use the|
character as a separator.The syntax is:
It allows avoiding creating unnecessary "exception" rules when our blocking rule covers too many domains. Here's a simple use-case, you may want to block everything save for a couple of TLD domains. You could use the standard approach, i.e. rules like this:
The problem with this approach is that this way you will also unblock tracking domains that are located on those TLDs (i.e.
google-analytics.com
). Here's how to solve this with$denyallow
:Examples
*$denyallow=com|net
— Block everything save for*.com
and*.net
.@@*$denyallow=com|net
— Unblock everything save for*.com
and*.net
||example.org^$denyallow=sub.example.org
— Blockexample.org
and*.example.org
, but don't blocksub.example.org
The text was updated successfully, but these errors were encountered: