MattiSG / adblock

Block ads and trackers system-wide, before a request is even issued.
MIT License
175 stars 13 forks source link

Add options to activate some commented entries from hosts zero #9

Closed davidbgk closed 7 years ago

davidbgk commented 7 years ago

After reading the source file, I realized that some hosts are commented:

#<maybe-spy>
#0.0.0.0 auto.search.msn.com  # Microsoft uses this server to redirect
                                # mistyped URLs to search engines. They
                                # log all such errors.
#0.0.0.0 sitefinder.verisign.com    # Verisign has joined the game 
#0.0.0.0 sitefinder-idn.verisign.com    # of trying to hijack mistyped
                    # URLs to their site. 
                    # May break iOS Game Center.

#0.0.0.0 s0.2mdn.net        # This may interfere with some streaming 
                # video on sites such as cbc.ca
#0.0.0.0 ad.doubleclick.net   # This may interefere with www.sears.com
                # and potentially other sites. 
0.0.0.0 media.fastclick.net # Likewise, this may interfere with some
0.0.0.0 cdn.fastclick.net   # sites. 
#0.0.0.0 ebay.doubleclick.net       # may interfere with ebay
#0.0.0.0 google-analytics.com           # breaks some sites
#0.0.0.0 ssl.google-analytics.com
#0.0.0.0 www.google-analytics.l.google.com
#0.0.0.0 stat.livejournal.com       # There are reports that this may mess 
                    # up CSS on livejournal
#0.0.0.0 stats.surfaid.ihost.com    # This has been known cause 
                    # problems with NPR.org
#0.0.0.0 www.google-analytics.com       # breaks some sites
#0.0.0.0 ads.imeem.com      # Seems to interfere with the functioning of imeem.com
#</maybe-spy>

I wonder if it would be possible to activate/deactivate some ranges like that:

sudo adblock --with-range maybe-spy

I'm not sure about the syntax but hopefully you get the point :)

MattiSG commented 7 years ago

Thanks for the suggestion!

However, upon closer inspection, I find only two sections that are partially commented out: maybe-spy and maybe-ads, and each commented line has a specific reason why next to it. I surely wouldn't recommend blocking google-analytics.com, for example, seeing how many sites break when GA is blocked… much better to have a browser switch.

I don't think that option would be worth using for two sections only. Maybe a --aggressive option could uncomment everything, but I feel it's too much work for the usage. The whole point of adblock is, I believe, that you can forget about it most of the time. If you have to switch it off and on through the command-line three times a week, like I have to do with Ghostery at the moment, I think it's going to be too much of a pain.

If one wants to uncomment specific lines, these can be added manually in your standard hosts file, as it is merged with the blocker one :)

I'll close that issue for the moment, but feel free to continue the discussion if you really believe it's important.