futpib / policeman

Firefox extention for cross-site requests control (kind of RequestPolicy clone)
https://addons.mozilla.org/en-US/firefox/addon/policeman/
143 stars 11 forks source link

Support for various blacklist formats #63

Open xdmx opened 10 years ago

xdmx commented 10 years ago

I'd love to have the ability to enable external sources (like the ones umatrix uses) and have them blacklisted automatically, and maybe even hidden by default + the ability to have styles&images enabled by default (but for those blacklisted domains they'd still be blocked)

futpib commented 10 years ago

enable external sources (like the ones umatrix uses)

Like what?

Everything else looks possible with custom rulesets (which are buggy right now)

xdmx commented 10 years ago

These are the sources umatrix uses: µMatrix hosts file Long-lived malware domains‎ (mirror1.malwaredomains.com) Malware domains‎ (mirror1.malwaredomains.com) Peter Lowe’s Ad server list‎ (pgl.yoyo.org) Malware Domain List‎ (www.malwaredomainlist.com) hpHosts’s Ad and tracking servers‎ (hosts-file.net) Dan Pollock’s hosts file‎ (someonewhocares.org) MVPS HOSTS‎ (winhelp2002.mvps.org)

plus many other external sources used by ublock to block&hiding ads

If I add a rule "permit all images and styles from anywhere" that would also allow images from google-analytics (which could track visits), unless I add another rule saying that it should block everything from google-analytics. Because there are so many tracking websites that would be a huge job to do, those external sources would help a lot since they have all various domains (like google-analytics) which should block everything even if there is a rule to allow images&style from anywhere... unless there is another rule that says to permit them. The priority may be something like: temporary rules persistent rules external sources (block everything) allow images&styles (this may even be something that can be changed in the config, to allow only images, only styles, or any other combination)

I'd keep the last one as a separate rule because it'd permit to have external sources have a bigger priority, still considering permanent rules if you want to enable a blocked domain

This could have problems when there is domain.com allowed (which also allows subdomains), but they use also tracking.domain.com (which is blocked in the external sources), so maybe the priority should be:

external sources (block everything) temporary rules persistent rules

futpib commented 10 years ago

Ok, I got it.

heforfree commented 10 years ago

all this hosts url include in or can add in to this HostsMan http://www.abelhadigital.com/hostsman or adding to firewall security program i prefer #61,block all origin then make personal allow list also this dont slowdown firefox? however this is can be Optional

futpib commented 9 years ago

@xdmx I opened a separate #114 issue for ruleset with configurable set of allowed content-types. Right now I can suggest you one of allow_styles_and_images allow_styles_and_images_same_site. It should work well at least on pre-release.

Here are different formats I've found:

Let me add this to the list:

Is there any I missed?

heforfree commented 9 years ago

i installed simple_domains_blacklist.txt and put it on my top of ruleset now randomly iselect and paste down1.cnzz.cc to firefox urlbar from simple_domains_blacklist.txt but it is not blocked by policeman down1.cnzz.cc it is go to http://www.cnzz.cc/ it is must go "Unable to connect" firefox bage or say "Page Blocked by Policeman" Firefox can't establish a connection to the server at down1.cnzz.cc and then if it is in destination become hidden and blocked forever

heforfree commented 9 years ago

and if i create temp or persistant rule from url that are in black list file it allow request

heforfree commented 9 years ago

@futpib actualy seems blacklist working,if i put rulset of them on top of "Allow internal requests and navigation" ruleset. and pervent me from go to blacklisted site. but have one problem if i close policeman preferences window,the blacklist ruleset go back below of "Allow internal requests and navigation" ruleset.so dont work and also this rule -> * ".exe": REJECT if rulest not on top.

also this is log when the ruleset is on top and i try open blacklisted site

[Exception... "Component returned failure code: 0x805e0006 [nsIWebNavigation.loadURI]" nsresult: "0x805e0006 ()" location: "JS frame :: chrome://global/content/bindings/browser.xml :: loadURIWithFlags :: line 148" data: no] tabbrowser.xml:1705