gorhill / httpswitchboard

Point & click to forbid/allow any class of requests made by your browser. Use it to block scripts, iframes, ads, facebook, etc.
GNU General Public License v3.0
1.33k stars 84 forks source link

Fallback behavior when matrix filtering reaches the last node #295

Open fooz123 opened 10 years ago

fooz123 commented 10 years ago

Thanks for providing us with this awesome extension :) There is only one thing that was bothering me and I have a suggestion for improving it.

When traversing the matrix nodes and reaching the last "all" node the current logic is:

Is everything from anywhere whitelisted? Yes: request is allowed No: Is everything from anywhere blacklisted? Yes: request is blocked No: request is blocked

I would like to suggest different behavior when reaching that last "No". If you neither choose to default to deny/allow a request for the current scope (blacklist/whitelist the "all" cell), I think it would be nice to start the same filtering logic in a higher level scope.

For instance, if I choose to allow frames from .youtube.com in the global scope, I usually want to allow such frames on all pages (unless specifically stated otherwise). However, currently I have to manually whitelist frames from .youtube.com on all domain/site scopes if i want these frames to be allowed.

This might not be acceptable to be the default because it breaks current behavior, but it would be nice to be able to choose this behavior as an option from the settings page.

gorhill commented 10 years ago

The way you describe your specific scenario, it is as if no explicit rule exists in the evaluation path starting from frame for youtube.com up to all.

In such case, the proper solution to enable Youtube everywhere is to create an ubiquitous rules in the Your allow rules field (dashboard => Ubiquitous rules):

youtube.com
fooz123 commented 10 years ago

Now I understand how to do this. Thanks :) It would be nice if there was a page about ubiquitous rules in the wiki. I still think that deferring to a higher scope is more intuitive than current behavior and would be more flexible than Ubiquitous rules.

Speaking of Ubiquitous rules, what is "Your block rules" used for? A ubiquitous rule can be overridden by any scoped rule for the same element, and if there is no scoped rule for this request the default is to block. So how does it really affect the filtering?

gorhill commented 10 years ago

what is "Your block rules" used for?

For the same purpose 60K ubiquitous hostnames in the preset lists are blocked ubiquitously. If ubiquitous blacklisting didn't exist, this means you would have to mind those trackers, ad servers, malware domains, etc. when you whitelist a type of request. Many of these hostnames try to download an image, and since these are whitelisted, for convenience, ubiquitously blacklisted hostnames won't be able to see this whitelisting of images.

I have facebook.com in my ubiquitous block rules, so no image or css from facebook.com will ever reach my browser.