essandess / adblock2privoxy

Convert adblock config files to privoxy format
https://hackage.haskell.org/package/adblock2privoxy
GNU General Public License v3.0
93 stars 15 forks source link

Add badfilter support #5

Closed jayvdb closed 6 years ago

jayvdb commented 6 years ago

Rules with badfilter should be used to eliminate bad rules.

https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#badfilter

This is needed to use https://github.com/uBlockOrigin/uAssets/blob/master/filters/unbreak.txt

essandess commented 6 years ago

Just add url’s to the command line to incorporate additional rules:

adblock2privoxy -p /usr/local/etc/adblock2privoxy/privoxy -w /usr/local/etc/adblock2privoxy/css -d 10.0.1.3:8119 \
  https://easylist.to/easylist/easyprivacy.txt  \
  https://easylist.to/easylist/easylist.txt  \
  https://easylist.to/easylist/fanboy-annoyance.txt  \
  https://easylist.to/easylist/fanboy-social.txt  \
  https://easylist-downloads.adblockplus.org/antiadblockfilters.txt  \
  https://easylist-downloads.adblockplus.org/malwaredomains_full.txt  \
  https://raw.githubusercontent.com/Dawsey21/Lists/master/adblock-list.txt \
  https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/unbreak.txt

Note that in the parent repo easylist-pac-privoxy, the default behavior uses a supervised classifier to downselect the number of rules to a few thousand so that the resulting proxy.pac JavaScript file works well on mobile devices. All rules are not by default included in proxy.pac, but adblock2privoxy does incorporate all rules.

I’ll look into adding this url as the default option in both repos.

essandess commented 6 years ago

Before I do that, what’s going on in this easyprivacy upstream issue? Will easyprivacy incorporate unbreak.txt itself?

jayvdb commented 6 years ago

Will easyprivacy incorporate unbreak.txt itself?

No, unbreak.txt is from a separate project, and overrides easyprivacy, for when easyprivacy and other rule groups have mistakes.

essandess commented 6 years ago

That’s still upstream. I can’t incorporate fixes into repos from other rule sets.

Thanks for pointing out the issue and the fix for anyone who wants to DIY.