gorhill / uMatrix

uMatrix: Point and click matrix to filter net requests according to source, destination and type
GNU General Public License v3.0
4.56k stars 472 forks source link

Show source of host blacklisting #526

Open dag opened 8 years ago

dag commented 8 years ago

My apologies if this has been discussed previously; I could find no relevant issues.

I'd like to be able to see where a blacklisting of a hostname is coming from, i.e. which hosts file or I suppose, which local rule. The logical place for this would be in the logger, as in uBlock, although I would certainly not mind some way to see this in the matrix itself if the UI could allow for it sensibly (not sure).

Optimally I'd like to know all hosts files a hostname is in, since there is often quite a bit of overlap, but knowing one source would be preferable over not knowing anything. I can understand if uMatrix isn't storing that information, for efficiency, but perhaps it could simply scan all active hosts files when you ask for this, since it won't be something happening all the time in the background or without user interaction? I think it's fine if clicking for more details about a request in the logger is comparably slow.

This would go particularly well with #525 giving you a way to see the hpHosts classification of a hostname, and would also be useful for debugging false-positives and tell you which hosts file to possibly disable.

edit:

It would also be very useful if this information was listed on the block notice page for 1st-party requests.

JeffCarpenter commented 5 years ago

@gorhill would you be open to PRs for this feature?