Skip to content
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

TLD - Approve list (Block everything else) #2917

Closed
kiwilad-nz opened this issue Apr 5, 2021 · 4 comments
Closed

TLD - Approve list (Block everything else) #2917

kiwilad-nz opened this issue Apr 5, 2021 · 4 comments
Labels

Comments

@kiwilad-nz
Copy link

I am very much considering using Adguard Home but believe the below feature would be a very useful one to be added before I make the jump.

pfblocker has a collated list of all ccTLD and other category TLDs etc that can be selected upon setup. More or less you can select the TLDs you approve which in returns blocks all #other TLD (everything else not approved).

Discussed this here: https://www.reddit.com/r/Adguard/comments/mk7jrl/questions_features_of_adguarrd_home/

@Aikatsui
Copy link
Contributor

Aikatsui commented Apr 5, 2021

Block everything else: This is already possible on adguard home using regex rule: /.+/ https://regex101.com/r/DVU7nM/2 and whitelist required items @@||*.com^$important, @@||*.net^$important (or create your own blocklist and allowlist) If that seems comfortable then you can update the reddit thread as well.

Personally i'm not interest for this feature about provide domain extension list and it is unnecessary, i have opened enhancement related extensions on #1733

@kiwilad-nz
Copy link
Author

kiwilad-nz commented Apr 5, 2021

@Aikatsui - Hey, I may be misunderstanding you but I may just need to set up a VM/Docker and start testing it I guess and try your suggestion.

So if I were to use a regex of /.+/, would I need to be putting in multiple lines of TLD I would like to block?
ie;
.+.com
.+.au
.+.cn

I see your approach still useful but still not as effective (if I am correct in the above) because in my environment, there's is only a dozen of TLD's that are trusted from the start for me.

I personally feel the way pfblocker handles this is really good. It gives you and overview of TLD's which is very long/thorough and makes you highlight/select the TLD's you want to whitelist (and will in return block every other TLD that isn't selected).

It's 2nd process is to then block subdomains that are still listed in blacklists that fall within the whitelisted TLD's.

I understand that you may not appreciate this feature, but it is one that I value highly and others would be sure to use if implemented.

Thanks for the reply nonetheless.

@Aikatsui
Copy link
Contributor

Aikatsui commented Apr 5, 2021

I personally feel the way pfblocker handles this is really good. It gives you and overview of TLD's which is very long/thorough and makes you highlight/select the TLD's you want to whitelist (and will in return block every other TLD that isn't selected).

This is an existing feature and it's almost effective, you're simply asking about UI enhancement that is quite unwanted for adguardhome as mentioned above

If you only need to block several countries ccTLDs eg: australia, china, russia then do not use /.+/ regex rule and use basic adblock rule. ||*.au^, ||*.cn^, ||*.ru^

select the TLD's you want to whitelist (and will in return block every other TLD that isn't selected)

If you need to allow several extensions eg: .com, .net, .app and block everything else then put the /.+/ regex rule top of the list and write rules for @@||.com^, @@||.net^, @@||*.app^

Read this guide, you can be find more flexible usage capabilities than to pfblocker How to Write Hosts Blocklists

@ameshkov
Copy link
Member

ameshkov commented Apr 5, 2021

whitelist required items @@||.com^$important, @@||.net^$important (or create your own blocklist and allowlist) If that seems comfortable then you can update the reddit thread as well.

This way ad domains there will also be unblocked.

Tbh, it seems that denyallow modifier should also be ported to AdGuard Home: AdguardTeam/CoreLibs#1304 (comment)

In this case, you'll simply need something like this:
*$denyallow=com|org|uk

In the case of other AdGuard versions, one could use a regular expression with negative lookahead (like this one: ^(?!.*(\.org|\.co\.uk)).*$). Unfortunately, negative lookahead is not supported by Golang's regular expressions.

I think implementing this modifier will solve the issue completely, I've filed a new issue about that: #2923

@ameshkov ameshkov closed this as completed Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants