主黑名单已含各类别,再叠加分类列表既无用也不推荐;关键正则(l.google.com、googlevideo.com)不在黑名单内需单独添加;YouTube 广告走 DNS 难以完全屏蔽,可能误伤正常内容。
在 Pi-hole 黑名单设置中添加:https://raw.githubusercontent.com/nickspaargaren/no-google/master/pihole-google.txt
或安装正则:curl -sSl https://raw.githubusercontent.com/nickspaargaren/no-google/master/install.py | python3README 未说明;实际运行依赖 Pi-hole 或支持 RPZ 的 DNS 服务器(BIND、Knot、Unbound 等),转换脚本需 Python 3。
一份屏蔽 Google 及其服务的 DNS 黑名单,帮你在网络层切断 Google 追踪
用 hosts、Pi-hole、AdGuard 等 DNS 拦截方案彻底屏蔽 Google 及其各项服务,适合想摆脱谷歌追踪、保护隐私的人。
核心能力
- 提供 Pi-hole 可直接订阅的完整域名黑名单
- 按 YouTube、邮件、字体、分析等类别拆分订阅
- 附正则过滤器拦截 googlevideo 等动态子域
- convert.py 可导出 RPZ、Unbound、dnsmasq、JSON 等格式
- 支持 NextDNS 及 hosts、domains、通配符等多种格式
容易踩的坑
暂无 release 数据(可能没有发版,或尚未同步)。
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
Definition of GAFAM
The GAFAM is an acronym used to describe the five multinational technology companies Google, Amazon, Facebook, Apple and Microsoft, taking the first letters of all these companies. The GAFAM are sometimes referred to as the Big Five due to them being the five most profilific companies in the world. Although in some sectors some of the five companies may be in direct competition, they offer different products or services overall while presenting some common characteristics that deserve to bring them together under the same acronym: by their size, they are particularly influential on the American and European Internet both economically and politically and socially and are regularly the subject of criticism or prosecution on tax matters, abuses of dominant positions and the non-respect of Internet users' privacy.
Purge Google from your network!
Protect yourself from Google's surveillance by using this blocklist! Feel free to criticize our blocklist to make it better and better. Suggestions are welcome!
How to use it on my Pi-hole?
Simply go into to your blocklist settings to add:
https://raw.githubusercontent.com/nickspaargaren/no-google/master/pihole-google.txt
Or a selection of the domains :
https://raw.githubusercontent.com/nickspaargaren/no-google/master/categories/youtubeparsed
https://raw.githubusercontent.com/nickspaargaren/no-google/master/categories/shortlinksparsed
https://raw.githubusercontent.com/nickspaargaren/no-google/master/categories/proxiesparsed
https://raw.githubusercontent.com/nickspaargaren/no-google/master/categories/productsparsed
https://raw.githubusercontent.com/nickspaargaren/no-google/master/categories/mailparsed
https://raw.githubusercontent.com/nickspaargaren/no-google/master/categories/generalparsed
https://raw.githubusercontent.com/nickspaargaren/no-google/master/categories/fontsparsed
https://raw.githubusercontent.com/nickspaargaren/no-google/master/categories/firebaseparsed
https://raw.githubusercontent.com/nickspaargaren/no-google/master/categories/doubleclickparsed
https://raw.githubusercontent.com/nickspaargaren/no-google/master/categories/domainsparsed
https://raw.githubusercontent.com/nickspaargaren/no-google/master/categories/dnsparsed
https://raw.githubusercontent.com/nickspaargaren/no-google/master/categories/androidparsed
https://raw.githubusercontent.com/nickspaargaren/no-google/master/categories/analyticsparsed
https://raw.githubusercontent.com/nickspaargaren/no-google/master/categories/fiberparsed
(Combining those with the main whole filter is useless and not recommended, however, feel free to combine the different smaller filters)
:warning: Important regex filters not included in blocklist
.*[`^.`]l.google.com$
For example tygbrbooefk4.cache.l.google.com
.*[`^.`]googlevideo.com$
For example r14---sn-vgqs7ned.googlevideo.com
Youtube Advertisements Regex
^r[0123456789]+((-{3})|(.))sn-.{8}.googlevideo.com$
NOTE: Youtube advertisements are pretty difficult to block trough DNS, as they mainly use a couple of domains for delivering advertisements, but they may also use those same domains for delivering other types of contents that you might not want to block.
Regex filters
(.*\.|^)((think)?with)?google($|((adservices|apis|mail|static|syndication|tagmanager|tagservices|usercontent|zip|-analytics)($|\..+)))
(.*\.|^)g(gpht|mail|static|v(t[12])?)($|\..+)
(.*\.|^)chrom(e(experiments)?|ium)($|\..+)
(.*\.|^)ampproject($|\..+)
(.*\.|^)doubleclick($|\..+)
(.*\.|^)firebaseio($|\..+)
(.*\.|^)googlevideo($|\..+)
(.*\.|^)waze($|\..+)
(.*\.|^)y(outube|timg)($|\..+)
You can also easily use the modified pihole regex installer script by @mmoti by executing this terminal command from your raspberry Pi Pi-hole server.
curl -sSl https://raw.githubusercontent.com/nickspaargaren/no-google/master/install.py | python3
and then, executing it. It should add all of the above regex automatically.
FAQ
Development
Run make to list all available commands.
The converter program
Data conversion
The program convert.py will read pihole-google.txt as input file and convert its
content into different output formats. It can be invoked like
python3 convert.py pihole
python3 convert.py rpz
python3 convert.py unbound
python3 convert.py dnsmasq
In order to produce all different output formats, run
python3 convert.py all
JSON output
It also can output the data in JSON format:
python3 convert.py json
With this output, and the jq program, the data can be filtered and manipulated easily.
In the following section, you can find corresponding examples.
# Produce list of all category names
python3 convert.py json | jq -r 'keys | .[]'
# Produce list of domains for the `Doubleclick` category only
python3 convert.py json | jq -r '.Doubleclick | .[]'
# Produce list of domains for the `Analytics` and `Doubleclick` categories
python3 convert.py json | jq -r '(.Analytics,.Doubleclick) | .[]'
Can I block the other letters of GAFAM ?
Of course, here’s some filterlists that should help you accomplish that.
Apple : https://github.com/c-edw/ios-telemetry, https://github.com/1r2/iosparanoid or https://raw.githubusercontent.com/hagezi/dns-blocklists/main/hosts/native.apple.txt
Facebook : https://raw.githubusercontent.com/jmdugan/blocklists/master/corporations/facebook/all, https://raw.githubusercontent.com/anudeepND/blacklist/master/facebook.txt or https://github.com/Bundy01/meta-blocklists
Amazon : https://github.com/nickspaargaren/no-amazon
Microsoft : https://raw.githubusercontent.com/jmdugan/blocklists/master/corporations/microsoft/all

