From dd433c4edabf4634c5b61787edfca18dbad245f4 Mon Sep 17 00:00:00 2001 From: Peter Snyder Date: Thu, 13 Jun 2019 11:27:21 -0700 Subject: [PATCH] split brave rules across more descriptive files, fixes #81 --- README.md | 12 +++- brave-allow.txt | 90 ++++++++++++++++++++++++ brave-block.txt | 107 ++++++++++++++++++++++++++++ brave-unbreak.txt | 176 ++-------------------------------------------- 4 files changed, 214 insertions(+), 171 deletions(-) create mode 100644 brave-allow.txt create mode 100644 brave-block.txt diff --git a/README.md b/README.md index 57b33748..eb6bd723 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,16 @@ If you modify any of these lists, follow [these instructions](https://github.com ## brave-unbreak.txt -Combined with all lists, including regional. +Rules designed to unbreak sites broken by other lists. + +## brave-block.txt + +Additional tracking and advertising blocking rules specific to Brave, such as anti-ad-block. + +## brave-allow.txt + +Rules for allowing trusted resources onto pages, including anti-adblock bypasses, distinct from webcompat concerns. ## coin-miners.txt -Tracks URLs that do coin mining. +Tracks URLs that do coin mining. \ No newline at end of file diff --git a/brave-allow.txt b/brave-allow.txt new file mode 100644 index 00000000..407ed104 --- /dev/null +++ b/brave-allow.txt @@ -0,0 +1,90 @@ +! Note that options will be added to exclude these filters soon. They +! are added both as a blocking rule and as an exception rule so that +! an exception is hit and will override what's in tracking protection protection. +! Facebook logins and embeds +||connect.facebook.com/*/sdk.js$script,tag=fb-embeds +@@||connect.facebook.com/*/sdk.js$script,tag=fb-embeds +||connect.facebook.net/*/sdk.js$script,tag=fb-embeds +@@||connect.facebook.net/*/sdk.js$script,tag=fb-embeds +||facebook.com/connect/$tag=fb-embeds +@@||facebook.com/connect/$tag=fb-embeds +||www.facebook.com/connect$tag=fb-embeds +@@||www.facebook.com/connect$tag=fb-embeds +||staticxx.facebook.com/connect/$tag=fb-embeds +@@||staticxx.facebook.com/connect/$tag=fb-embeds +||graph.facebook.com/$tag=fb-embeds +@@||graph.facebook.com/$tag=fb-embeds +||staticxx.facebook.com/$tag=fb-embeds +@@||staticxx.facebook.com/$tag=fb-embeds +||xx.fbcdn.net/$tag=fb-embeds +@@||xx.fbcdn.net/$tag=fb-embeds +||www.facebook.com/*/plugin$tag=fb-embeds +@@||www.facebook.com/*/plugin$tag=fb-embeds +||www.facebook.com/plugins/$tag=fb-embeds +@@||www.facebook.com/plugins/$tag=fb-embeds +||www.facebook.com/rsrc.php$tag=fb-embeds +@@||www.facebook.com/rsrc.php$tag=fb-embeds +||www.facebook.com/ajax/bz$tag=fb-embeds +@@||www.facebook.com/ajax/bz$tag=fb-embeds +! Twitter embeds +||platform.twitter.com/$tag=twitter-embeds +@@||platform.twitter.com/$tag=twitter-embeds +||syndication.twitter.com/$tag=twitter-embeds +@@||syndication.twitter.com/$tag=twitter-embeds +||pbs.twimg.com/$tag=twitter-embeds +@@||pbs.twimg.com/$tag=twitter-embeds +||cdn.syndication.twimg.com/$tag=twitter-embeds +@@||cdn.syndication.twimg.com/$tag=twitter-embeds +||twitter.com/i/videos/tweet/$tag=twitter-embeds +@@||twitter.com/i/videos/tweet/$tag=twitter-embeds +||abs.twimg.com/web-video-player/$tag=twitter-embeds +@@||abs.twimg.com/web-video-player/$tag=twitter-embeds +||api.twitter.com/1.1/$tag=twitter-embeds +@@||api.twitter.com/1.1/$tag=twitter-embeds +||video.twimg.com/$tag=twitter-embeds +@@||video.twimg.com/$tag=twitter-embeds +! LinkedIn in embed +||platform.linkedin.com/$tag=linked-in-embeds +@@||platform.linkedin.com/$tag=linked-in-embeds +||www.linkedin.com/pages-extensions/FollowCompany$tag=linked-in-embeds +@@||www.linkedin.com/pages-extensions/FollowCompany$tag=linked-in-embeds +||static.licdn.com/sc/p$tag=linked-in-embeds +@@||static.licdn.com/sc/p$tag=linked-in-embeds + +! Fix sign in icon on https://app.mysms.com/#login +||developers.google.com/identity/$image,domain=mysms.com +@@||developers.google.com/identity/$image,domain=mysms.com + +! Allow 1P piwik since it's no different than server logs +@@https://analytics.*/piwik.$~third-party + +! Allow ads on DDG: brave-browser/issues#4533 +@@||duckduckgo.com/m.js +@@||duckduckgo.com/share/spice/amazon/ + +! yt embed exceptions +@@||youtube.com/yts/jsbin^$domain=thegatewaypundit.com|godlikeproductions.com|techcrunch.com + +! Fix for Suicide Prevention Lifeline Chat (brave/brave-browser#3492) +@@||geoplugin.net/javascript.gp$script,xmlhttprequest,domain=suicidepreventionlifeline.org + +! DDG 1P analytics and optimization +@@||improving.duckduckgo.com^$~third-party + +! Anti-adblock: wallpapersite.com (https://www.reddit.com/r/brave_browser/comments/bx784t/websites_detecting_adblocker_even_when_shield/) +@@||wallpapersite.com/scripts/ads.js$script +! Anti-adblock: wallpapershome.com +@@||wallpapershome.com/scripts/ads.js$script +! Anti-adblock: dreamdth.com +@@||dreamdth.com/js/wutime_adblock/ads.js$script +! thehindu.com (https://github.com/brave/brave-browser/issues/4808) +@@||thgim.com/static/js/ads.min.js$script,domain=thehindu.com +! Anti-adblock: stream2watch.ws +@@||stream2watch.ws/js/advertisement.js$script + +! Fix facebook logins on messenger.com https://github.com/brave/brave-browser/issues/4173 +@@||facebook.com/login/$domain=messenger.com +@@||connect.facebook.net^$domain=messenger.com + +! https://github.com/brave/adblock-lists/issues/39 +@@||alb.reddit.com^ \ No newline at end of file diff --git a/brave-block.txt b/brave-block.txt new file mode 100644 index 00000000..2e1546ee --- /dev/null +++ b/brave-block.txt @@ -0,0 +1,107 @@ +! Fix page rendering due to issues with scorecardresaerch.com https://github.com/brave/brave-browser/issues/1580 +||scorecardresearch.com^$domain=dailymotion.com +! https://community.brave.com/t/ad-not-bloked-properly/63628 +||readthedocs.org/api/v2/sustainability/$script,domain=pyexcel.org + +! content blocking +||seattletimes.com/wp-content/plugins/st-user-messaging^$script +||theatlantic.com/packages/adsjs^$script + +! fixes ad blocking bypass +||zdbb.net^$third-party +||adiode.com^$third-party + +||novately.com^$third-party +||webspectator.com^$third-party + +! LA Times and Chicago Tribune native ads fixes +||aggrego.org^$script,image,domain=latimes.com|chicagotribune.com +||jadserve.postrelease.com^$script,image,domain=latimes.com|chicagotribune.com +||troncdata.com^$script,image,domain=latimes.com +||polarmobile.com^$script,image,domain=latimes.com|chicagotribune.com +||ntv.io^$script,image,domain=latimes.com|chicagotribune.com + +! Expressen.se and aftonbladet.set ad blocking evasion fix +||biowebb-data.s3.amazonaws.com^$script,image,domain=expressen.se|aftonbladet.se +||richmetrics.com^$script,image,domain=expressen.se|aftonbladet.se +||adtomafusion.net^$script,image,domain=expressen.se|aftonbladet.se +||ld1.lpbeta.com^$script,image,domain=expressen.se|aftonbladet.se +||csp.screen9.com^$script,image,domain=expressen.se|aftonbladet.se +||glimr.io^$script,image,domain=expressen.se|aftonbladet.se +||aka-cdn-ns.adtech.de^$script,image,domain=aftonbladet.se|expressen.se + +! LA Times forced-whitelisting modal fix +||tribdss.com/meter/assets$script,domain=www.latimes.com + +! Twitch main video +||cloudfront.net/esf.js$domain=twitch.tv + +! theatlantic.com anti-blocker filters +||theatlantic.blueconic.net$domain=theatlantic.com +||theatlantic.com/please-support-us^ + +! fb widget audience, ad and marketing tracking +||connect.facebook.net/*/fbevents.js$third-party +||facebook.com/tr^$image,third-party + +! Hearst anti-ad blocking fix +||aps.hearstnp.com^$script,image +! Sailthru native ad aggregator fix +||ak.sail-horizon.com^$script,image + +! vendors serving video ads and tracking via proxied requests +||track.atom-data.io^$third-party +||vidazoo.com/aggregate^$third-party +||vidazoo.com/proxy^$third-party +||mediabong.net^$third-party +||imprvdosrv.com^$third-party + +! gRPC client ad tracking data fix boston.com sfgate.com +||g.3gl.net^$domain=sfgate.com|boston.com +! 123movies.is video player display banner overlay fix +||123clouds.ru/*/custombanner.js^$script,domain=123movies.is +! murdoog submission tracking +||murdoog.com^$third-party +! Admiral anti-ad blocking fix +||functionalclam.com^$third-party +||ctnet2.in$third-party + +! fixes calls bypassing shields on salon.com +||salon.com/jobs.js +||carambo.la^$third-party + +! Disable PDFJS's (which we include by default) telemetry +||pdfjs.robwu.nl + +! fixes for several requests bypassing default blocklists +||bounceexchange.com^$third-party +||npttech.com/advertising.js$important,script +||aolcdn.com/*/adsWrapper.js$script +||keywee.co$third-party +||summerhamster.com^ +||zergnet.com^$script,third-party + +! block scripts that profile user behavior using password managers +||audienceinsights.net^$third-party +||behavioralengine.com^$third-party + +! Block additional trackers +||sp1.nypost.com$third-party +||sp.nasdaq.com$third-party +||assets.lesechos.com/common/js/xtcore.js$third-party +||y8.com/js/sdkloader/outstream.js$third-party + +! key logger +||turner.com/*/keypress.js$domain=cnn.com + +! intermediary domains used for malware payload delivery +||centerbluray.info^ +||newcyclevaults.com^ + +! tracking +||optimizely.com^$third-party +! crypto ad network +||ctnetload.com^$third-party + +! misc / unsorted +||ntv.io^$third-party \ No newline at end of file diff --git a/brave-unbreak.txt b/brave-unbreak.txt index 74a83667..1a4e18be 100644 --- a/brave-unbreak.txt +++ b/brave-unbreak.txt @@ -1,179 +1,17 @@ -||ntv.io^$third-party +! Internal reddit API that breaks reddit for many users +@@||gateway.reddit.com^ @@||adm.fwmrm.net^*/AdManager.js$domain=msnbc.com|sky.com|cnbc.com -||novately.com^$third-party -||webspectator.com^$third-party -! Twitch main video -||cloudfront.net/esf.js$domain=twitch.tv -! LA Times forced-whitelisting modal fix -||tribdss.com/meter/assets$script,domain=www.latimes.com -! LA Times and Chicago Tribune native ads fixes -||aggrego.org^$script,image,domain=latimes.com|chicagotribune.com -||jadserve.postrelease.com^$script,image,domain=latimes.com|chicagotribune.com -||troncdata.com^$script,image,domain=latimes.com -||polarmobile.com^$script,image,domain=latimes.com|chicagotribune.com -||ntv.io^$script,image,domain=latimes.com|chicagotribune.com -! Expressen.se and aftonbladet.set ad blocking evasion fix -||biowebb-data.s3.amazonaws.com^$script,image,domain=expressen.se|aftonbladet.se -||richmetrics.com^$script,image,domain=expressen.se|aftonbladet.se -||adtomafusion.net^$script,image,domain=expressen.se|aftonbladet.se -||ld1.lpbeta.com^$script,image,domain=expressen.se|aftonbladet.se -||csp.screen9.com^$script,image,domain=expressen.se|aftonbladet.se -||glimr.io^$script,image,domain=expressen.se|aftonbladet.se -||aka-cdn-ns.adtech.de^$script,image,domain=aftonbladet.se|expressen.se -! Hearst anti-ad blocking fix -||aps.hearstnp.com^$script,image -! Sailthru native ad aggregator fix -||ak.sail-horizon.com^$script,image -! gRPC client ad tracking data fix boston.com sfgate.com -||g.3gl.net^$domain=sfgate.com|boston.com -! 123movies.is video player display banner overlay fix -||123clouds.ru/*/custombanner.js^$script,domain=123movies.is -! vendors serving video ads and tracking via proxied requests -||track.atom-data.io^$third-party -||vidazoo.com/aggregate^$third-party -||vidazoo.com/proxy^$third-party -||mediabong.net^$third-party -||imprvdosrv.com^$third-party -! yt embed exceptions -@@||youtube.com/yts/jsbin^$domain=thegatewaypundit.com|godlikeproductions.com|techcrunch.com -! fb widget audience, ad and marketing tracking -||connect.facebook.net/*/fbevents.js$third-party -||facebook.com/tr^$image,third-party -! theatlantic.com anti-blocker filters -||theatlantic.blueconic.net$domain=theatlantic.com -||theatlantic.com/please-support-us^ -! murdoog submission tracking -||murdoog.com^$third-party -! Admiral anti-ad blocking fix -||functionalclam.com^$third-party -||ctnet2.in$third-party + ! adops.com unusable without this @@||adops.com^$~third-party @@||www.scrumpoker.online^$~third-party -! fixes for several requests bypassing default blocklists -||bounceexchange.com^$third-party -||npttech.com/advertising.js$important,script -||aolcdn.com/*/adsWrapper.js$script -||keywee.co$third-party -||summerhamster.com^ -||zergnet.com^$script,third-party -! intermediary domains used for malware payload delivery -||centerbluray.info^ -||newcyclevaults.com^ -! block scripts that profile user behavior using password managers -||audienceinsights.net^$third-party -||behavioralengine.com^$third-party @@||api.huobi.pro^$domain=www.huobi.pro -! fixes calls bypassing shields on salon.com -||salon.com/jobs.js -||carambo.la^$third-party -! key logger -||turner.com/*/keypress.js$domain=cnn.com -! fixes ad blocking bypass -||zdbb.net^$third-party -||adiode.com^$third-party -! content blocking -||seattletimes.com/wp-content/plugins/st-user-messaging^$script -||theatlantic.com/packages/adsjs^$script -! tracking -||optimizely.com^$third-party -! crypto ad network -||ctnetload.com^$third-party -! Internal reddit API that breaks reddit for many users -@@||gateway.reddit.com^ -! https://github.com/brave/adblock-lists/issues/39 -@@||alb.reddit.com^ -! DDG 1P analytics and optimization -@@||improving.duckduckgo.com^$~third-party -! Disable PDFJS which we include by default's telemetry -||pdfjs.robwu.nl -! Allow 1P piwik since it's no different than server logs -@@https://analytics.*/piwik.$~third-party -! Fix for Suicide Prevention Lifeline Chat (brave/brave-browser#3492) -@@||geoplugin.net/javascript.gp$script,xmlhttprequest,domain=suicidepreventionlifeline.org -! Block additional trackers -||sp1.nypost.com$third-party -||sp.nasdaq.com$third-party -||assets.lesechos.com/common/js/xtcore.js$third-party -||y8.com/js/sdkloader/outstream.js$third-party -! Note that options will be added to exclude these filters soon. They -! are added both as a blocking rule and as an exception rule so that -! an exception is hit and will override what's in tracking protection protection. -! Facebook logins and embeds -||connect.facebook.com/*/sdk.js$script,tag=fb-embeds -@@||connect.facebook.com/*/sdk.js$script,tag=fb-embeds -||connect.facebook.net/*/sdk.js$script,tag=fb-embeds -@@||connect.facebook.net/*/sdk.js$script,tag=fb-embeds -||facebook.com/connect/$tag=fb-embeds -@@||facebook.com/connect/$tag=fb-embeds -||www.facebook.com/connect$tag=fb-embeds -@@||www.facebook.com/connect$tag=fb-embeds -||staticxx.facebook.com/connect/$tag=fb-embeds -@@||staticxx.facebook.com/connect/$tag=fb-embeds -||graph.facebook.com/$tag=fb-embeds -@@||graph.facebook.com/$tag=fb-embeds -||staticxx.facebook.com/$tag=fb-embeds -@@||staticxx.facebook.com/$tag=fb-embeds -||xx.fbcdn.net/$tag=fb-embeds -@@||xx.fbcdn.net/$tag=fb-embeds -||www.facebook.com/*/plugin$tag=fb-embeds -@@||www.facebook.com/*/plugin$tag=fb-embeds -||www.facebook.com/plugins/$tag=fb-embeds -@@||www.facebook.com/plugins/$tag=fb-embeds -||www.facebook.com/rsrc.php$tag=fb-embeds -@@||www.facebook.com/rsrc.php$tag=fb-embeds -||www.facebook.com/ajax/bz$tag=fb-embeds -@@||www.facebook.com/ajax/bz$tag=fb-embeds -! Twitter embeds -||platform.twitter.com/$tag=twitter-embeds -@@||platform.twitter.com/$tag=twitter-embeds -||syndication.twitter.com/$tag=twitter-embeds -@@||syndication.twitter.com/$tag=twitter-embeds -||pbs.twimg.com/$tag=twitter-embeds -@@||pbs.twimg.com/$tag=twitter-embeds -||cdn.syndication.twimg.com/$tag=twitter-embeds -@@||cdn.syndication.twimg.com/$tag=twitter-embeds -||twitter.com/i/videos/tweet/$tag=twitter-embeds -@@||twitter.com/i/videos/tweet/$tag=twitter-embeds -||abs.twimg.com/web-video-player/$tag=twitter-embeds -@@||abs.twimg.com/web-video-player/$tag=twitter-embeds -||api.twitter.com/1.1/$tag=twitter-embeds -@@||api.twitter.com/1.1/$tag=twitter-embeds -||video.twimg.com/$tag=twitter-embeds -@@||video.twimg.com/$tag=twitter-embeds -! Fix sign in icon on https://app.mysms.com/#login -||developers.google.com/identity/$image,domain=mysms.com -@@||developers.google.com/identity/$image,domain=mysms.com -! Fix page rendering due to issues with scorecardresaerch.com https://github.com/brave/brave-browser/issues/1580 -||scorecardresearch.com^$domain=dailymotion.com -! https://community.brave.com/t/ad-not-bloked-properly/63628 -||readthedocs.org/api/v2/sustainability/$script,domain=pyexcel.org -! LinkedIn in embed -||platform.linkedin.com/$tag=linked-in-embeds -@@||platform.linkedin.com/$tag=linked-in-embeds -||www.linkedin.com/pages-extensions/FollowCompany$tag=linked-in-embeds -@@||www.linkedin.com/pages-extensions/FollowCompany$tag=linked-in-embeds -||static.licdn.com/sc/p$tag=linked-in-embeds -@@||static.licdn.com/sc/p$tag=linked-in-embeds + ! Fix addthis.com issues on rhmodern.com https://github.com/brave/brave-browser/issues/3653 @@||s7.addthis.com^$script,domain=rhmodern.com + ! Fix https://github.com/brave/brave-browser/issues/4507 (mirrors uBO fix, rewritten so that brave/ad-block supports) ||washingtonpost.com/pb/api/*/adblocker-feature$xmlhttprequest,first-party + ! Fix blankpage issue https://github.com/brave/brave-browser/issues/4049 -||dianomi.com/cgi-bin/smartads.pl$xmlhttprequest,domain=inc.com -! Anti-adblock: stream2watch.ws -@@||stream2watch.ws/js/advertisement.js$script -! Fix facebook logins on messenger.com https://github.com/brave/brave-browser/issues/4173 -@@||facebook.com/login/$domain=messenger.com -@@||connect.facebook.net^$domain=messenger.com -! Anti-adblock: wallpapersite.com (https://www.reddit.com/r/brave_browser/comments/bx784t/websites_detecting_adblocker_even_when_shield/) -@@||wallpapersite.com/scripts/ads.js$script -! Anti-adblock: wallpapershome.com -@@||wallpapershome.com/scripts/ads.js$script -! Anti-adblock: dreamdth.com -@@||dreamdth.com/js/wutime_adblock/ads.js$script -! thehindu.com (https://github.com/brave/brave-browser/issues/4808) -@@||thgim.com/static/js/ads.min.js$script,domain=thehindu.com -! Allow ads on DDG: brave-browser/issues#4533 -@@||duckduckgo.com/m.js -@@||duckduckgo.com/share/spice/amazon/ +||dianomi.com/cgi-bin/smartads.pl$xmlhttprequest,domain=inc.com \ No newline at end of file