简单点说AdGuard Home就是一个公共DNS服务,如Google的公共DNS8.8.8.8,和DNSmasq一样AdGuard Home是开源的,可以自行搭建安装后在客户端配置使用。

AdGuard Home使用Golang开发,编译好了各大平台的二进制文件,因此安装非常简单,这里以CentOS 7为例,其它系统可参考官方帮助文档。

AdGuard Home主要功能

  • 拦截随处可见的广告
  • 注重隐私保护
  • 家庭保护模式
  • 自定义过滤
完成使用截图(云服务器)

CentOS 7 X64安装

AdGuard Home二进制文件位于https://github.com/AdguardTeam/AdGuardHome/releases 可根据自己的平台下载最新版本。

CentOS 7安装方法如下:

#安装依赖环境 wget(已安装过的请忽略)
yum -y install wget
#下载AdGuard Home(官网对国内不太友好,所以上传到了自己的服务器)
#截止发文日--下面为最新版本v0.102.0
wget https://app.521sj.cn/AdGuardHome_linux_amd64.tar.gz
#解压
tar xvf AdGuardHome_linux_amd64.tar.gz
#进入AdGuardHome目录
cd AdGuardHome
#放行3000端口(AdGuardHome初始化需要使用)
#firewalld放行3000端口
firewall-cmd --zone=public --add-port=3000/tcp --permanent
firewall-cmd --reload
#iptables放行3000端口
iptables -A INPUT -p tcp --dport 3000 -j ACCEPT
service iptables save
#启动AdGuard Home
./AdGuardHome -s install

运行AdGuardHome后,会提示打开http://IP:3000端口进行初始化。

安装成功(本地)

浏览器打开http://IP:3000,根据提示无脑的下一步即可。首次初始化会要求设置账号、密码(请牢记),下次登录需要使用。

DNS默认使用53(TCP/UDP)端口进行通信,因此别忘记放行53端口,否则DNS无法正常使用。

#firewalld放行53端口
firewall-cmd --zone=public --add-port=53/tcp --permanent
firewall-cmd --zone=public --add-port=53/udp --permanent
firewall-cmd --reload
#iptables放行53端口
iptables -A INPUT -p tcp --dport 53 -j ACCEPT
iptables -A INPUT -p udp --dport 53 -j ACCEPT
service iptables save

如果你是使用你路由器、软路由,安装方法大同小异,只不过需要在你的软路由安装一个新容器CentOS等均可(也有将 adguardhome 做成插件的 OpenWRT 、lede、爱快等系统,使用更加方便。请自寻相关资源)。此处不做教程(软路由等新建容器搭建系统)。

设置上游DNS

上游dns的意思是 adguardhome 查询你要用的网址时用的dns服务
Bootstrap DNS 服务器是 adguardhome 查询dns服务器ip时用的dns服务器
上游服务器应该设置成响应最快的多个dns地址,下面为推荐的DNS地址(你可以选择你感觉比较快的DNS)。

https://dns.adguard.com/dns-query
https://dns.cloudflare.com/dns-query
tls://dns.google
tcp://8.8.8.8
tcp://8.8.4.4
176.103.130.130
114.114.114.114
119.29.29.29

附录AdGuardHome规则

过滤器—-DNS过滤

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

发现过滤器有的打不开自己想进入的网页时,请检查官方自动规则。然后添加其他规则。

注意:如果你想要通过过滤器过滤国内主流视频网站的广告有些艰难,毕竟国内主要就是靠这个赚取收益,他们的技术团队肯定会实时更新相关规则的,所以你在网上找的那些规则基本无用。屏蔽一些小网站的垃圾广告还是有些用的。

自定义过滤器—-以下仅仅为推荐,封锁清单中添加勾选即可

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
AdAway
https://adaway.org/hosts.txt
AdGuard Simplified Domain Names filter
https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txt

以下慎用

I don’t care about cookies 屏蔽网站 cookies 相关警告!!!
 https://www.i-dont-care-about-cookies.eu/abp/

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注