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

[Feature request] Add whitelisted mode #315

Open
elyahw opened this issue Jul 10, 2024 · 7 comments
Open

[Feature request] Add whitelisted mode #315

elyahw opened this issue Jul 10, 2024 · 7 comments

Comments

@elyahw
Copy link

elyahw commented Jul 10, 2024

It would be very useful if the app had a whitelisted mode. Only the included addresses would be allowed, otherwise everything else is blocked.

Instead of blocking hundreds of thousands of domains, one could add a few hundred main ones he uses and have peace of mind. This whitelist would then grow with time. I found whitelisting the most effective kind of blocking.

@realbiz21
Copy link

@elyahw this is already possible.

Modify the additional hosts file, and at the bottom, place a "*"

@elyahw
Copy link
Author

elyahw commented Jul 25, 2024

Thanks. The only problem now is that what if I have some 20k websites to whitelist?

Is not it possible to put them in a list somewhere other than here?

@slcw
Copy link

slcw commented Jul 25, 2024

To whitelist a host just go to "Configure Additional Hosts" and add the host with a preceding "!". For example...

!google.com
!nextdns.io
!amazon.com

You can also use wildcards in whitelist entries. For example...

!*.google.com

This will whitelist all hosts of the Google domain, but not google.com itself. So, if you want to whitelist google.com in addition to all sub-hosts, you need both entries. For example...

!google.com
!*.google.com

@twu2
Copy link

twu2 commented Jul 31, 2024

+1

The current whitelist mode need to edit additionalHosts.txt, can't update just like blacklist.
It will be great if we can toggle the blacklist/whitelist mode in the filter settting, then it could be auto-refresh like blacklist hosts file.

@ThatAnnoyingVegan
Copy link

Yes, please.

@elyahw
Copy link
Author

elyahw commented Nov 23, 2024

You can also use wildcards in whitelist entries. For example...

!*.google.com

This will whitelist all hosts of the Google domain, but not google.com itself. So, if you want to whitelist google.com in addition to all sub-hosts, you need both entries. For example...

!google.com !*.google.com

Thanks @slcw.

The whitelisting is actually redundant. It is never triggered and it does not override any other rules. The piece in the AdditionalHosts.txt which says:

# PRIORITIES in case of conflicting entries
# 1. Explicit entries without wildcards
# 2. Wildcard entries prioritized along the sequence in this file
# 3. Downloaded blocklist

Is incorrect. Rules 1 and 3 would mean that explicitly whitelisted entries, e.g. !google.com in the additional list should override other lists, but this does not happen and it is ignored completely. It is redundant. if google.com is included in the "downloaded blocklist", and whitelisted here, then it will still be blocked.

So the filter has no whitelisted mode at all.. There is no need to include any whitelisted entry, e.g. !*.google.com as you suggested because all unblocked entries are whitelisted by default..

@IngoZenz
Copy link
Owner

IngoZenz commented Nov 24, 2024

I do not understand this request. It works as designed as you described in the first part of your message. I also do not plan to add suport for whitelist filter lists. It would get messy with the priorities of conflicting entries. It is already complicated today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants