All Projects → essandess → easylist-pac-privoxy

essandess / easylist-pac-privoxy

Licence: GPL-3.0 license
EasyList Tracker and Adblocks to Proxy Auto Configuration (PAC) File and Privoxy Actions and Filters

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to easylist-pac-privoxy

adblock2privoxy
Convert adblock config files to privoxy format
Stars: ✭ 78 (-21.21%)
Mutual labels:  tracker, lan, adblock, easylist, proxy-configuration, privoxy, adblocking, privacy-enhancing-technologies, privacy-tools
autohosts
Automate hosts file updates on Linux and MacOS. Block Firefox telemetry, Google snooping and web trackers at the root.
Stars: ✭ 69 (-30.3%)
Mutual labels:  adblocking, privacy-enhancing-technologies, privacy-tools
dePAC
seamless Proxy Auto-Config (a.k.a. Web Proxy Auto Discovery) for CLI apps
Stars: ✭ 26 (-73.74%)
Mutual labels:  pac, proxy-configuration
Macos Fortress
Firewall and Privatizing Proxy for Trackers, Attackers, Malware, Adware, and Spammers with Anti-Virus On-Demand and On-Access Scanning (PF, squid, privoxy, hphosts, dshield, emergingthreats, hostsfile, PAC file, clamav)
Stars: ✭ 307 (+210.1%)
Mutual labels:  tracker, adblock
AdBlock-Acceleration
Accelerated subscription for international/China region ad filtering rules(国际/中国地区广告过滤规则的加速订阅)
Stars: ✭ 327 (+230.3%)
Mutual labels:  adblock, easylist
SDK-Privacy-Report
Privacy details of SDKs for Apple Privacy Nutrition & Google Safety Section disclosure.
Stars: ✭ 219 (+121.21%)
Mutual labels:  privacy-enhancing-technologies, privacy-tools
hosts
冷莫(trli)的规则唯一一个提供全球比较全的库Cold Mo (TRLI) rules is the only one to provide a global comparison of the library.
Stars: ✭ 4 (-95.96%)
Mutual labels:  pac, adblock
Block
Let's make an annoyance free, better open internet, altogether!
Stars: ✭ 1,849 (+1767.68%)
Mutual labels:  tracker, adblock
V2ray Rules Dat
🦄 🎃 👻 V2Ray 路由规则文件加强版,可代替 V2Ray 官方 geoip.dat 和 geosite.dat,兼容 Shadowsocks-windows、Xray-core、Trojan-Go 和 leaf。Enhanced edition of V2Ray rules dat files, compatible with Xray-core, Shadowsocks-windows, Trojan-Go and leaf.
Stars: ✭ 6,550 (+6516.16%)
Mutual labels:  adblock, easylist
shifting
A privacy-focused list of alternatives to mainstream services to help the competition.
Stars: ✭ 31 (-68.69%)
Mutual labels:  privacy-enhancing-technologies, privacy-tools
gpc-optmeowt
Browser extension for opting out from the sale and sharing of personal information per the California Consumer Privacy Act and other privacy laws
Stars: ✭ 75 (-24.24%)
Mutual labels:  privacy-enhancing-technologies, privacy-tools
protect-your-privacy
Privacy resources for the layperson. Highlights resources, tools, VPNs, search engines, articles, books, and dark patterns.
Stars: ✭ 33 (-66.67%)
Mutual labels:  privacy-enhancing-technologies, privacy-tools
easylistbrasil
EasyList Brasil
Stars: ✭ 14 (-85.86%)
Mutual labels:  adblock, easylist
Anti Ad
致力于成为中文区命中率最高的广告过滤列表,实现精确的广告屏蔽和隐私保护。anti-AD现已支持AdGuardHome,dnsmasq, Surge,Pi-Hole,smartdns等网络组件。完全兼容常见的广告过滤工具所支持的各种广告过滤列表格式
Stars: ✭ 3,788 (+3726.26%)
Mutual labels:  adblock, easylist
Bromite
Bromite a Chromium fork with ad blocking and privacy enhancements; take back your browser!
Stars: ✭ 3,256 (+3188.89%)
Mutual labels:  adblock, adblocking
Blacklist
Curated and well-maintained hostfile to block ads, tracking, cryptomining, and more! Updated regularly. ⚡🔒
Stars: ✭ 492 (+396.97%)
Mutual labels:  tracker, adblock
AdBlockID
🛡️ An effective filter for removing most ads on Indonesian and Malaysian websites.
Stars: ✭ 121 (+22.22%)
Mutual labels:  adblock, easylist
indonesianadblockrules
Filter tambahan untuk EasyList memblokir iklan berbahasa Indonesia dan Malaysia.
Stars: ✭ 93 (-6.06%)
Mutual labels:  adblock, easylist
hosts
🄯Curated lists of hosts files with various domain blocks.🄯
Stars: ✭ 15 (-84.85%)
Mutual labels:  adblock, adblocking
just-detect-adblock
It's FuckAdBlock with a minimalist API.
Stars: ✭ 71 (-28.28%)
Mutual labels:  adblock, adblocking

easylist-pac-privoxy

EasyList Tracker and Adblock Rules to Proxy Auto Configuration (PAC) File and Privoxy Actions and Filters

Converts EasyList tracker and ad blocking rules to efficient network-level blocks in a proxy.pac file for automatic proxy network configurations and Privoxy proxy servers.

Easily incorporates multiple blocking rulesets into both PAC and Privoxy formats, including easyprivacy.txt, easylist.txt, fanboy-annoyance.txt, fanboy-social.txt, antiadblockfilters.txt, malwaredomains_full.txt, and the anti-spamware list adblock-list.txt.

Deprecation Warning

The PAC-based approach used in this repo to block content no longer works with several common browsers: iOS Safari (#21), and Google Chrome (policy PacHttpsUrlStrippingEnabled disabled). Therefore, it is recommended that this approach be replaced wiht Privoxy configured for HTTPS Inspection:

sudo port install privoxy
port notes privoxy

Or:

sudo port install macos-fortress-proxy
port notes privoxy

Purpose

Provide tracker and ad blocking at the kernel and network layers using the crowd-sourced EasyList blocking rulesets used by client-based browser plugins. This proxy configuration provides EasyList blocking rules for all devices on the LAN or VPN, beyond the capabilities of client-specific plugins.

A combination of a proxy.pac file with Privoxy and a webserver for CSS rules that perform element blocking is used to implement all the features of EasyList blocking rules.

Blocking capability Browser Plugin proxy.pac Privoxy Privoxy+CSS
EasyList regex rules
EasyList element hiding
HTTP
HTTPS
Client-level
Kernel-level
Network-level
Large rulesets

Proxy Auto Configuration (PAC)

To Use: Localhost

Download the proxy.pac file.

On macOS (without Server.app):

sudo cp ~/Downloads/proxy.pac /Library/WebServer/Documents
sudo apachectl start

Set your network Proxy Auto Configuration setting to:

http://localhost/proxy.pac or http://host-ip-address/proxy.pac

Advantages

  • Works for any mobile or desktop device on your LAN.
  • Works with an upstream proxy if specified in the proxy.pac file.
  • Individual update control and customization of the proxy.pac file and filter rules.
  • Possible internet access if port 80 exposed outside the LAN firewall.

Disadvantages

  • Does not work on mobile data networks.
  • No internet access unless port forwarding to host is used.

Path stripping/inclusion in FindProxyForURL

Many Easylist rules use URL path information to determine of the request should be blocked or not. Becasue the full URL with its path is necessarily visible to the browser, this information can be passed to the Proxy Autoconfig file, even if the URL uses HTTPS, which is an advantage of using a PAC file for filtering.

However, this behavior presents a security vulnerability if the OS is configured to use a malicious PAC file. This issue can affect any browser, including Chrome and Safari.

Recent versions of Chrome and Firefox are configured to only send the domain name to the FindProxyForURL function, which closes this potential security vulnerability, but also prevents blocks based on URL path information.

To allow this blocking capability:

  • Chrome: Set the policy PacHttpsUrlStrippingEnabled to be false. In macOS:

defaults write com.google.Chrome PacHttpsUrlStrippingEnabled -bool false

  • Firefox: Set the configuration variable network.proxy.autoconfig_url.include_path to be true using the Firefox link about:config.

To Use: VPN

Configure an OpenVPN Server to use the proxy.pac file hosted on your LAN.

This is the best option.

Advantages

  • Works on any mobile or desktop device on any mobile data or WiFi network worldwide.
  • Individual update control and customization of the proxy.pac file and filter rules.
  • Security and privacy benefits of VPNs.

Disadvantages

  • Necessity of VPN server.

To Use: GitHub Host

Set your network Proxy Auto Configuration setting to:

https://raw.githubusercontent.com/essandess/easylist-pac-privoxy/master/proxy.pac

Advantages

  • Works on any mobile or desktop device on any WiFi network worldwide.
  • GitHub server; private web server not necessary.

Disadvantages

  • Does not work on mobile data networks.
  • Does not work on iOS without an open blackhole with HTTP return code 200 for blackholed sites.
  • Reliance on a third-party (me) for pass/block rule sets, updates, and proxy.pac integrity.

Details

Using EasyList rules in a in a proxy.pac file provides these benefits:

  • Tracker and Ad blocking performed in all clients that use PAC files, browsers and non-browsers alike.
  • Tracker and Ad blocking on both desktop and mobile devices, especially via VPN.
  • Browser plugins or filtering proxies are not necessarily used (although PAC files work well in sequence with these).
  • PAC files do not alter the webpage DOM, used by adblock detection methods.

The script easylist_pac.py downloads EasyList and EasyPrivacy rules and converts these to a combination of very efficient Javascript hash lookups and efficient NFA regular expressions. The size of the PAC file and rulesets are limited in the posted example to a total of over fifteen thousand (18788) to ensure efficient execution on modern mobile devices. For full rulesets, use in conjunction with a browser plugin and/or Privoxy.

Example hash (exact match) blocking entries look like:

"tracker.myseofriend.net"
"adwiretracker.fwix.com"

Example regular expression blocking rules look like:

online.*/promoredirect?key=
secureprovide1.com/*=tracking

EasyList to proxy.pac converter

python3 easylist_pac.py
python3 easylist_pac.py -h
python3 easylist_pac.py -b blackhole-ip-address:port -d download_dir -p proxy:port -P proxy.pac.orig

The new file proxy.pac will be created in the (default ~/Downloads directory. See easylist_pac.py -h for options.

Privoxy

The repo adblock2privoxy is used to achieve nearly full EasyList rule capability, complete with element hiding.

After installing adblock2privoxy, an example production run with regular updates looks like:

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

# then every few days
adblock2privoxy -t /usr/local/etc/adblock2privoxy/privoxy/ab2p.task
# restart privoxy, e.g. sudo port unload privoxy ; sudo port load privoxy

Public Service Announcement

This proxy.pac is configured to block all known tracker and adware content at the network level. Many websites now offer an additional way to block ads: subscribe to their content. Security and privacy will always necessitate ad blocking, but now that this software has become mainstream with mainstream effects, ad blocker users must consider the potential impact of ad blocking on the writers and publications that are important to them. Personally, two publications that I gladly pay for, especially for their important US political and other coverage, are the New York Times and The Atlantic. I encourage all users to subscribe to their own preferred publications and writers.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].