blokada icon indicating copy to clipboard operation
blokada copied to clipboard

I want to add ability to block all urls and whitelist only few

Open Rafi993 opened this issue 5 years ago • 7 comments

Blockada should have option to block list all URLs and whitelist only from given list.

Rafi993 avatar Jul 22 '19 03:07 Rafi993

I'll program this for you for $10. Is this feature worth $10 to you?

Thomas499 avatar Jul 22 '19 18:07 Thomas499

@Thomas499 can you generate your business somewhere else and keep Blokada's repo free of it?

peterroth avatar Jul 22 '19 19:07 peterroth

@rpeter85 I don't see why you don't want developers to gauge in the level of interest of each topic. Perhaps if he said it was worth it to him i'd do it. Its easy enough to do, but I believe he's the only person that would use the feature. Maybe two others would try it until they realized how much of an annoyance it would be to add every url that want to view to the whitelist.

@Rafi993 download android studios, upload the code from github, then look in the BlockaTunnel.kt file and change

return if (blockade.allowed(host) || !blockade.denied(host)) {

to

return if (blockade.allowed(host)) {

and in the DnsProxy.kt file change

if (blockade.allowed(host) || !blockade.denied(host)) {

to

if (blockade.allowed(host)) {

and that will achieve what you want. Its probably going to take you a while to learn how to get android studios to upload and compile the code though. I'll be happy to compile it for you and send it to you on telegram if you want to give me your user name.

But for the record, I think blocking every URL that isn't in the whitelist is a very very bad idea.

Thomas499 avatar Jul 22 '19 20:07 Thomas499

I totally agree with that.

peterroth avatar Jul 24 '19 06:07 peterroth

Thanks @Thomas499 I was able to build it. I'll just put a option to toggle it and give a PR for this so that someone else looking for it could use it too.

Rafi993 avatar Jul 25 '19 06:07 Rafi993

I dont think its a bad idea. Though majority of blokada uses will not use this feature, it can be used for "Parental Control" just like this request (https://github.com/blokadaorg/blokada/issues/135) I guess...

shuvashish76 avatar Apr 06 '20 10:04 shuvashish76

I would like this feature as well, to block every URL that isn't on the whitelist.

As you mentioned above, the default should be the current behaviour, but in settings there could be a switch for advanced users to enable the whitelist approach.

I'm doing this with the app NetGuard right now, but I would like to switch to blokada because of my support for other family members. Blokada is much more intuitive in my opinion.

Russe avatar Nov 23 '20 16:11 Russe