AdGuardHome 是一款开源项目 具体介绍与详情见:
https://github.com/AdguardTeam/AdGuardHome 我们可以在利用 AdGuardHome 来为我们的设备过滤部分广告的同时为我们提供一个纯净无污染的私人DNS服务。
AdGuardHome安装 在 https://github.com/AdguardTeam/AdGuardHome/releases 根据自己的平台来下载对应的版本 下面是我的安装步骤:
1 2 3 4 5 6 7 wget https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.105.0-beta.4/AdGuardHome_linux_amd64.tar.gz tar -zxvf AdGuardHome_linux_amd64.tar.gz cd AdGuardHome_linux_amd64 ./AdGuardHome //启动AdGuardHome
在浏览器里打开所搭建设备的对应 IP 加端口 例如 192.168.1.1:3000 进入设置界面设置即可
为了方便启动AdGuardHome,我们可以将AdGuardHome加入到系统service服务
1 ./AdGuardHome -s install //以后便可通过 service AdGuardHome start 来启动服务
DNS设置 上游 DNS 服务器 下面我列出的全是加密DNS 可防止DNS污染
1 2 3 4 5 6 https://dns.rubyfish.cn/dns-query https://dns.adguard.com/dns-query https://dns.cloudflare.com/dns-query https://dns.containerpi.com/dns-query tls://8.8.8.8 tls://8.8.4.4
只添加谷歌的即可 当然也许有更好的 可根据自己情况来
Bootstrap DNS 服务器 用来解析上游服务器的 我选择的腾讯的DNS 可根据自己情况来。
过滤器 DNS封锁清单 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 anti-AD: https://cdn.jsdelivr.net/gh/privacy-protection-tools/anti-AD@master/anti-ad-easylist.txt StevenBlack: https://cdn.jsdelivr.net/gh/StevenBlack/hosts@master/alternates/fakenews-gambling/hosts Google hosts: https://raw.githubusercontent.com/googlehosts/hosts/master/hosts-files/hosts ----------------------------------------------------- jdlingyu: https://raw.githubusercontent.com/jdlingyu/ad-wars/master/hosts EasyList China: https://easylist-downloads.adblockplus.org/easylistchina.txt yhosts: https://raw.githubusercontent.com/vokins/yhosts/master/hosts.txt ChinaListV2.0: http://tools.yiclear.com/ChinaList2.0.txt AdGuard Mobile Ads filter: https://filters.adtidy.org/android/filters/11_optimized.txt 乘风: https://raw.githubusercontent.com/xinggsf/Adblock-Plus-Rule/master/ABP-FX.txt Fanboy+Easylist-Merged Ultimate List: https://secure.fanboy.co.nz/r/fanboy-ultimate.txt
多了没用处选择前三个就好
自定义过滤广告
根据自己情况来添加 我添加了四个放行两个拦截规则
1 2 3 4 5 6 @@||hub5pn.wap.sandai.net^$important @@||hub5btmain.sandai.net^$important ||043kgv434gsra.vip^$important ||tupian955.obs.cn-south-1.myhuaweicloud.com^$important @@||cm.bilibili.com^$important @@||pool.bt.n0808.com^$important