Mdaeo'Blog

Openwrt AdGuard Home 过滤规则设置

安装向导

在浏览器中打开 AdGuard Home 的后台,进入安装向导,点击 “开始配置”。默认后台地址为:http://IP:3000/

设置网络接口

将后台的访问端口更改为 3000,避免与 NAS 后台的 80 端口发生冲突,DNS 端口保持为 53 即可。

设置管理员账户

完成初始化设置

后期配置

安装完成后,我们还需要进一步的设置,根据需要作出一定的优化。

常规设置

DNS 设置

DNS 服务器推荐

不同地区连接至 DNS 服务器的速度各有差异,各位可以通过 Ping 测速的方式寻找当地连接延迟最低的 DNS 服务器。更多 DNS 服务器可以在 AdGuard 文档中找到。

DNS 提供商类别地址
阿里IPv4 DNS223.5.5.5
IPv6 DNS2400:3200:baba::1
DNS-over-Httpshttps://dns.alidns.com/dns-query
DNSPodIPv4 DNS119.29.29.29
DNS-over-Httpshttps://doh.pub/dns-query
114IPv4 DNS114.114.114.114
GoogleIPv4 DNS8.8.8.8
IPv6 DNS2001:4860:4860::8888
DNS-over-Httpshttps://dns.google/dns-query
CloudflareIPv4 DNS1.1.1.1
IPv6 DNS2606:4700:4700::1111
DNS-over-Httpshttps://dns.cloudflare.com/dns-query

DNS 封锁清单

为了更好地发挥 AdGuard Home 去广告的功能,仅依靠默认的过滤规则是不够的,但也不宜过多,过多的过滤规则会影响解析的速度,各位可以根据需要添加过滤规则。

名称介绍地址
AdGuard DNS FilterAdGuard官方维护的广告规则,涵盖多种过滤规则https://raw.githubusercontent.com/AdguardTeam/FiltersRegistry/master/filters/filter_15_DnsFilter/filter.txtv
EasyListAdblock Plus官方维护的广告规则https://easylist-downloads.adblockplus.org/easylist.txt
EasyList China面向中文用户的 EasyList 去广告规则https://easylist-downloads.adblockplus.org/easylistchina.txt
EasyPrivacy反隐私跟踪、挖矿规则https://easylist-downloads.adblockplus.org/easyprivacy.txt
Halflife规则涵盖了 EasyList China、EasyList Lite、CJX ’s Annoyance、乘风视频过滤规则,以及补充的其它规则https://gitee.com/halflife/list/raw/master/ad.txt
Xinggsf乘风过滤国内网站广告过滤规则https://gitee.com/xinggsf/Adblock-Rule/raw/master/rule.txt
Xinggsf乘风视频过滤视频网站广告过滤规则https://gitee.com/xinggsf/Adblock-Rule/raw/master/mv.txt
MalwareDomainList恶意软件过滤规则https://www.malwaredomainlist.com/hostslist/hosts.txt
Adblock Warning Removal List去除禁止广告拦截提示规则https://easylist-downloads.adblockplus.org/antiadblockfilters.txt
Anti-AD命中率高、兼容性强https://anti-ad.net/easylist.txt
Fanboy’s Annoyances List去除页面弹窗广告规则https://easylist-downloads.adblockplus.org/fanboy-annoyance.txt

以浏览国内网站为主的用户可以使用 anti-AD + Halflife 过滤规则,如有浏览国外网站的需要,可以根据需要添加 AdGuard DNS Filter、Fanboy's Annoyances List 等规则。不同规则之间会存在重叠的情况,可以通过 AdGuard Home 的拦截日志分析哪些规则的使用频率最高,哪些规则拦截频率最低,再加以取舍。

过滤器

AdGuard Home 可以解析基础的 adblock 规则和 Hosts 语法。

系统自带过滤器

AdGuard Simplified Domain Names filter

https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt

AdAway

https://adaway.org/hosts.txt

hpHosts - Ad and Tracking servers only

https://hosts-file.net/ad_servers.txt

MalwareDomainList.com Hosts List

https://www.malwaredomainlist.com/hostslist/hosts.txt

自定义过滤器

neoHosts Full 127.0.0.1 兼容性更好

https://hosts.nfz.moe/127.0.0.1/full/hosts

Easylist 官方规则

https://easylist.to/easylist/easylist.txt

EasyList China 中文补充规则

https://easylist-downloads.adblockplus.org/easylistchina.txt

EasyList Lite 中文精简规则

https://raw.githubusercontent.com/cjx82630/cjxlist/master/cjxlist.txt

EasyPrivacy 隐私保护

https://easylist-downloads.adblockplus.org/easyprivacy.txt

CJX's Annoyance List 去自我推广列表

https://raw.githubusercontent.com/cjx82630/cjxlist/master/cjx-annoyance.txt

ChinaList 国内大部分视频网站的广告过滤 (广告净化器)

~【凉凉】http://tools.yiclear.com/ChinaList2.0.txt~

【备份】https://raw.githubusercontent.com/hopol/ChinaList2.0/master/ChinaList2.0.txt

乘风 广告过滤规则

https://raw.githubusercontent.com/xinggsf/Adblock-Plus-Rule/master/ABP-FX.txt

【码云更新】https://gitee.com/xinggsf/Adblock-Rule/raw/master/rule.txt

【MV规则】https://gitee.com/xinggsf/Adblock-Rule/raw/master/mv.txt

Fanboy+Easylist-Merged Ultimate List

https://fanboy.co.nz/r/fanboy-ultimate.txt

StevenBlack

http://sbc.io/hosts/alternates/fakenews-gambling-porn-social/hosts

yhosts

https://raw.githubusercontent.com/vokins/yhosts/master/hosts

大圣净化

https://raw.githubusercontent.com/jdlingyu/ad-wars/master/hosts

1024_hosts

https://raw.githubusercontent.com/Goooler/1024_hosts/master/hosts

neoHosts Full

https://hosts.nfz.moe/full/hosts

Google Host

https://raw.githubusercontent.com/googlehosts/hosts/master/hosts-files/hosts

ChinaList+EasyList(修正)

http://sub.adtchrome.com/adt-chinalist-easylist.txt

以下慎用

I don't care about cookies 屏蔽网站 cookies 相关警告!!!

https://www.i-dont-care-about-cookies.eu/abp/

如果你觉得过滤得还不够,也可以在“自定义过滤器规则”按照以下过滤规则自己编写:

||example.org^ – 拦截 example.org 域名及其所有子域名

@@||example.org^ – 放行 example.org 及其所有子域名

127.0.0.1 example.org – 将会把 example.org(但不包括它的子域名)解析到 127.0.0.1

! 注释符号,表示这是一行注释

这也是注释符号,同样表示这是一行注释

/REGEX/ – 正则表达式模式

具体请参考《官方说明》

https://kb.adguard.com/en/general/dns-filtering-syntax

附录

anti-AD

目前中文区命中率最高的广告过滤列表,精确的广告屏蔽和隐私保护。已支持AdGuardHome,dnsmasq,Surge,Pi-Hole,SmartDNS等。

Github地址:https://github.com/privacy-protection-tools/anti-AD**

https://gitee.com/privacy-protection-tools/anti-ad/raw/master/easylist.txt

halflife

合并EasylistChina、EasylistLite、CJX'sAnnoyance,以及补充的一些规则

Homepage: https://adf.minggo.eu.org

https://gitee.com/halflife/list/raw/master/ad.txt

yhosts tvbox

https://github.com/vokins/yhosts

里面有个TVBOX的规则

https://raw.githubusercontent.com/vokins/yhosts/master/data/tvbox.txt

当前页面是本站的「Google AMP」版。查看和发表评论请点击:完整版 »