Ad Guard 过滤规则
最近用上了Ad Guard ,发现软件里面显示的屏蔽的记录还挺多的。遂分享下收集的规则和DNS
官方网站及项目地址
AdGuard官网:https://adguard.com
AdGuardHome项目地址:https://github.com/AdguardTeam/AdGuardHome
现在记录下日常使用的规则
2023年10月22更新
adblockfilters
主页:GitHub)
- AdGuard Home 等DNS拦截服务使用规则1
AdGuard 等浏览器插件使用规则1 + 规则2
Youtube去广告规则:
2022-0817更新
XXKiller
主页:GitHub)
包含大量的白名单地址,可自己克隆项目添加上游规则,24更新一次
Cats-Team/AdRules
主页:GitHub)
DNS类规则
超大规则
================================更新=====================================
2022-05-19更新:
o0HalfLife0o
主页:GitHub
[推荐移动端]合并自乘风视频广告过滤规则、EasylistChina、EasylistLite、CJX'sAnnoyance,以及补充的一些规则;
[推荐桌面端]合并自乘风视频广告过滤规则、Easylist、EasylistChina、EasyPrivacy、CJX'sAnnoyance,以及补充的一些规则;
================================原文=====================================
anti-AD (推荐)
官网地址规则:https://anti-ad.net/easylist.txt
乘风规则(推荐)
简介:xinggsf,乘风广告过滤规则(含贴吧, 屏蔽电信挟持弹窗)
- 广告规则(2021年5月份已停更)
- 视频规则
ADgk(针对安卓手机推荐)
简介:适用于 AdGuard for Android 的去广告规则
- 主地址
- 百度搜索结果内屏蔽百家号
cjx82630
简介:过滤烦人的自我推广,并补充 EasyPrivacy 隐私规则
规则
知乎(探索版)
简介:无
- 普通版
- 严格版
其他规则
- HalfLife,规则合并自 EasylistChina、EasylistLite、CJX’sAnnoyance 合并规则(推荐)
- EasyPrivacy : EasyPrivacy 是隐私保护,不被跟踪(推荐)
- EasyList China : 国内网站广告过滤的主规则
- EasyList :去广告主规则列表。主要面向英文网站,包含大量通用规则
- don’t care about cookies:我不关心 Cookie 的问题,屏蔽网站的 cookies 相关的警告
- 大圣净化(主要针对国内视频网站)
- yhosts(国内维护者屏蔽国内网站广告)
小计
如果你觉得过滤得还不够,也可以在“自定义过滤器规则”按照以下过滤规则自己编写:
||example.org^ – 拦截 example.org 域名及其所有子域名
@@||example.org^ – 放行 example.org 及其所有子域名
127.0.0.1 example.org – 将会把 example.org(但不包括它的子域名)解析到 127.0.0.1
! 注释符号,表示这是一行注释
这也是注释符号,同样表示这是一行注释
/REGEX/ – 正则表达式模式AdGuard Home 优化部署
一、上游DNS设置
1、不使用ISP默认DNS的好处是可以避免ISP通过DNS分析和掌握你的上网行为。我们把上游DNS更换成DNS over TLS的:
tls://dns.adguard.com tls://dns.quad9.net
tls://dns.google
tls://1.1.1.1
tls://1.0.0.12、当然,你也可以使用其他的公共DNS,不过国内公共的DNS暂不支持DNS over TLS(博主用的是223.5.5.5),比如:
223.5.5.5
223.6.6.6
114.114.114.114
114.114.115.115
119.29.29.29
119.28.28.283、如果你想启用ipv6的DNS,可以添加以下几个(但是启用ipv6后,不能过滤视频中的广告):
2409:8028:2000::1111
2409:8028:2000::2222
2620:0:ccc::2 2620:0:ccd::2配置备份
http:
pprof:
port: 6060
enabled: false
address: 0.0.0.0:80
session_ttl: 720h
users:
- name: admin
password:
auth_attempts: 5
block_auth_min: 15
http_proxy: ""
language: zh-cn
theme: auto
dns:
bind_hosts:
- 0.0.0.0
port: 53
anonymize_client_ip: false
ratelimit: 0
ratelimit_subnet_len_ipv4: 24
ratelimit_subnet_len_ipv6: 56
ratelimit_whitelist: []
refuse_any: true
upstream_dns:
- 223.5.5.5
- 223.6.6.6
- tls://dns.pub
- tls://dns.alidns.com
- https://dns.alidns.com/dns-query
- 114.114.114.114
- 119.29.29.29
- 180.76.76.76
- 202.102.128.68
upstream_dns_file: ""
bootstrap_dns:
- 119.29.29.29
- 9.9.9.10
- 149.112.112.10
- 2620:fe::10
- 2620:fe::fe:10
fallback_dns:
- 223.5.5.5
- 119.29.29.29
upstream_mode: parallel
fastest_timeout: 1s
allowed_clients: []
disallowed_clients: []
blocked_hosts:
- version.bind
- id.server
- hostname.bind
trusted_proxies:
- 127.0.0.0/8
- ::1/128
cache_size: 419430400
cache_ttl_min: 0
cache_ttl_max: 0
cache_optimistic: true
bogus_nxdomain: []
aaaa_disabled: false
enable_dnssec: false
edns_client_subnet:
custom_ip: ""
enabled: false
use_custom: false
max_goroutines: 300
handle_ddr: true
ipset: []
ipset_file: ""
bootstrap_prefer_ipv6: false
upstream_timeout: 5s
private_networks: []
use_private_ptr_resolvers: false
local_ptr_upstreams: []
use_dns64: false
dns64_prefixes: []
serve_http3: false
use_http3_upstreams: false
serve_plain_dns: true
hostsfile_enabled: true
pending_requests:
enabled: true
tls:
enabled: true
server_name: ""
force_https: false
port_https: 443
port_dns_over_tls: 853
port_dns_over_quic: 853
port_dnscrypt: 0
dnscrypt_config_file: ""
allow_unencrypted_doh: false
certificate_chain: ""
private_key: ""
certificate_path: [已移除敏感路径信息]
private_key_path: [已移除敏感路径信息]
strict_sni_check: false
querylog:
dir_path: ""
ignored: []
interval: 2160h
size_memory: 1000
enabled: true
file_enabled: true
statistics:
dir_path: ""
ignored: []
interval: 2160h
enabled: true
filters:
- enabled: true
url: https://adguardteam.github.io/HostlistsRegistry/assets/filter_1.txt
name: AdGuard DNS filter
id: 1
- enabled: true
url: https://adguardteam.github.io/HostlistsRegistry/assets/filter_2.txt
name: AdAway Default Blocklist
id: 2
- enabled: true
url: https://adguardteam.github.io/HostlistsRegistry/assets/filter_21.txt
name: 'CHN: anti-AD'
id: 1738584660
- enabled: true
url: https://adguardteam.github.io/HostlistsRegistry/assets/filter_30.txt
name: Phishing URL Blocklist (PhishTank and OpenPhish)
id: 1738584662
- enabled: true
url: https://adguardteam.github.io/HostlistsRegistry/assets/filter_35.txt
name: 'HUN: Hufilter'
id: 1738584663
- enabled: false
url: https://adguardteam.github.io/HostlistsRegistry/assets/filter_12.txt
name: Dandelion Sprout's Anti-Malware List
id: 1738584665
- enabled: true
url: https://raw.githubusercontent.com/VeleSila/yhosts/master/hosts.txt
name: yhosts
id: 1738584666
- enabled: true
url: https://raw.githubusercontent.com/banbendalao/ADgk/master/ADgk.txt
name: ADgk
id: 1738584667
- enabled: true
url: https://cdn.jsdelivr.net/gh/neoFelhz/neohosts@gh-pages/full/hosts.txt
name: neohosts
id: 1738584668
- enabled: true
url: https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext
name: yoyo
id: 1738584669
- enabled: true
url: https://adguardteam.github.io/HostlistsRegistry/assets/filter_24.txt
name: 1Hosts (Lite)
id: 1742678441
- enabled: true
url: https://raw.githubusercontent.com/217heidai/adblockfilters/main/rules/adblockdns.txt
name: adblockfilters
id: 1742678443
- enabled: true
url: https://raw.githubusercontent.com/Cats-Team/AdRules/main/dns.txt
name: Cats-Team
id: 1742678444
- enabled: true
url: https://gh.chjina.com/https://raw.githubusercontent.com/521xueweihan/GitHub520/main/hosts
name: GitHub
id: 1742679231
- enabled: true
url: https://hostfiles.frogeye.fr/firstparty-trackers-hosts.txt
name: firstparty
id: 1744694406
whitelist_filters: []
user_rules:
- '#白名单'
- '@@||chjina.com^'
- '#小米摄像头'
- '@@||business.smartcamera.api.io.mi.com^'
- '#小米反诈'
- '||a0.app.xiaomi.com'
- '||miav-cse.avlyun.com'
- '||miui-fxcse.avlyun.com'
- '||api.installer.xiaomi.com'
- '#小米手机流量校准'
- ' @@||api.sec.miui.com^$important'
- ' #小米日历数据更新'
- ' @@||api.io.mi.com^$important'
- ' @@||api.comm.miui.com^$important'
- ' #微信广告'
- ' ||dns.weixin.qq.com.cn^$important'
- ' ||dns.weixin.qq.com^$important'
- ' ||long.weixin.qq.com^$important'
- ' #搜狗输入法'
- ' ||ping.pinyin.sogou.com^$important'
- '@@||pan.quark.cn^$important'
- '#EMBY'
- '@@||imetyou.top^'
- '#美团'
- '||ntp.org^'
- '@@||wkdaily.cpolar.top^$important'
- '#其他'
- '||business.smartcamera.api.io.mi.com^$important'
- '@@||c.m.163.com^$important'
- '@@||qingmeipay.chuncheon241.top^$important'
- '@@||analytics-api.smzdm.com^'
- '@@||vv.video.qq.com^$important'
- '@@||m.qpic.cn^$important'
- '@@||collector.dcdn.baidu.com^$client=''10.0.0.16'''
- '@@||data.bilibili.com^$important'
- '@@||px.wpk.quark.cn^$important'
- '@@||su.quark.cn^$important'
- ""
dhcp:
enabled: false
interface_name: ""
local_domain_name: lan
dhcpv4:
gateway_ip: ""
subnet_mask: ""
range_start: ""
range_end: ""
lease_duration: 86400
icmp_timeout_msec: 1000
options: []
dhcpv6:
range_start: ""
lease_duration: 86400
ra_slaac_only: false
ra_allow_slaac: false
filtering:
blocking_ipv4: 0.0.0.0
blocking_ipv6: '::'
blocked_services:
schedule:
time_zone: Local
ids: []
protection_disabled_until: null
safe_search:
enabled: false
bing: true
duckduckgo: true
ecosia: true
google: true
pixabay: true
yandex: true
youtube: true
blocking_mode: default
parental_block_host: family-block.dns.adguard.com
safebrowsing_block_host: standard-block.dns.adguard.com
rewrites:
- domain: errlog.umeng.com
answer: 0.0.0.0
- domain: errlog.umeng.com
answer: '::'
- domain: '*.ntp.org'
answer: 0.0.0.0
- domain: '*.ntp.org'
answer: '::'
- domain: '*.asia.apple.com'
answer: 0.0.0.0
- domain: '*.asia.apple.com'
answer: '::'
- domain: '*.neixin.cn'
answer: 0.0.0.0
safe_fs_patterns:
- [已移除敏感路径信息]
safebrowsing_cache_size: 1048576
safesearch_cache_size: 1048576
parental_cache_size: 1048576
cache_time: 30
filters_update_interval: 1
blocked_response_ttl: 10
filtering_enabled: true
parental_enabled: false
safebrowsing_enabled: false
protection_enabled: true
clients:
runtime_sources:
whois: true
arp: true
rdns: false
dhcp: true
hosts: true
persistent: []
log:
enabled: true
file: ""
max_backups: 0
max_size: 100
max_age: 3
compress: false
local_time: false
verbose: false
os:
group: ""
user: ""
rlimit_nofile: 0
schema_version: 29最后
感谢各位大佬的辛勤付出
参考:
1.https://github.com/otobtc/ADhosts/blob/master/README.md
2.https://github.com/233Bazinga/AdGuardHome
3.https://wp.gxnas.com/4393.html

12 条评论
请问,有些请求拦截后就会反复请求(每隔一两秒),并且持续很久,是否需要放行白名单
看你需求了,如果终端设备没有什么影响,也可以不放行。我一般都是终端设备有问题才会放行。
白名单怎么添加
乘风其他规则已被删除,网页为 404
是的,刚才看了下乘风的Github,已经删除了其他规则
大佬 各大规则重复添加后会有后遗症吗
我的暂时没有发现后遗症,就是有的规则白名单多,放行的多。还有就是设备性能强的话多添加点无所谓,如果设备性能弱的话建议少添加些。
为啥有黑名单还需要添加白名单
小哥哥太帅了
国内可以阿里的 https://dns.alidns.com/dns-query
博主真厉害!
真棒!