关键字: openwrt, smartdns, adguardhome, openclash, 分流, 缓存, 去广告

目的: openclash 分流, smartdns 缓存DNS, adguardhome 去广告


设备及系统信息:


实现效果:


思路: smartdns 作为 openclash 上游服务器, openclash 作为 adguardhome 上游服务器


smartdns:

第一服务器

第二服务器

上游服务器 分组 CHINA

上游服务器 分组 GW


openclash:

全局设置 - 运行模式

全局设置 - DNS 设置

自定义 DNS 服务器


adguardhome

使用 53 端口 代替 dnsmasq

DNS 设置


DHCP and DNS 高级设置
Network -> DHCP and DNS -> Advanced Settings


附录

smartdns 配置
file: /etc/config/smartdns

config smartdnsoption server_name 'CHINA'option port '6913'option tcp_server '1'option ipv6_server '1'option dualstack_ip_selection '1'option serve_expired '1'option resolve_local_hostnames '1'option force_aaaa_soa '0'option force_https_soa '0'option rr_ttl_min '172800'option rr_ttl_max '345600'option seconddns_port '7913'option seconddns_tcp_server '1'option seconddns_force_aaaa_soa '0'option coredump '0'option seconddns_server_group 'GW'option auto_set_dnsmasq '0'option seconddns_no_rule_ipset '0'option seconddns_no_rule_soa '0'option cache_size '2000000'option seconddns_no_speed_check '1'option seconddns_no_dualstack_selection '0'option seconddns_no_rule_addr '1'option seconddns_no_rule_nameserver '0'option seconddns_no_cache '0'option prefetch_domain '1'option enabled '1'option seconddns_enabled '1'option old_port '6913'option old_enabled '1'option old_auto_set_dnsmasq '0'config serveroption enabled '1'option name 'DNSPod DNS'option ip '119.29.29.29'option type 'udp'option server_group 'CHINA'option blacklist_ip '0'config serveroption enabled '1'option name 'DNSPod DNS'option ip '182.254.116.116'option type 'udp'option server_group 'CHINA'option blacklist_ip '0'config serveroption enabled '1'option name '114DNS'option ip '114.114.114.114'option type 'udp'option server_group 'CHINA'option blacklist_ip '0'config serveroption enabled '1'option name '114DNS'option ip '114.114.114.115'option type 'udp'option server_group 'CHINA'option blacklist_ip '0'config serveroption enabled '1'option name '阿里 AliDNS'option ip '223.5.5.5'option type 'udp'option server_group 'CHINA'option blacklist_ip '0'config serveroption enabled '1'option name '阿里 AliDNS'option ip '223.6.6.6'option type 'udp'option server_group 'CHINA'option blacklist_ip '0'config serveroption enabled '1'option name '腾讯 TenDNS'option ip '119.29.29.29'option type 'udp'option blacklist_ip '0'option server_group 'CHINA'config serveroption enabled '1'option name '腾讯 TenDNS'option ip '182.254.116.116'option type 'udp'option server_group 'CHINA'option blacklist_ip '0'config serveroption enabled '1'option ip '8.8.8.8'option server_group 'GW'option blacklist_ip '0'option name 'Google DNS'option port '853'option type 'tls'option no_check_certificate '0'config serveroption enabled '1'option name 'Google DNS'option ip '8.8.4.4'option server_group 'GW'option blacklist_ip '0'option port '853'option type 'tls'option no_check_certificate '0'config serveroption enabled '1'option name 'V2EX DNS'option ip '199.91.73.222'option server_group 'GW'option blacklist_ip '0'option port '853'option type 'tls'option no_check_certificate '0'config serveroption enabled '1'option name 'V2EX DNS'option ip '178.79.131.110'option server_group 'GW'option blacklist_ip '0'option port '853'option type 'tls'option no_check_certificate '0'config serveroption enabled '1'option name 'Cloudflare DNS'option ip '1.1.1.1'option server_group 'GW'option blacklist_ip '0'option port '853'option type 'tls'option no_check_certificate '0'config serveroption enabled '1'option name 'Cloudflare DNS'option ip '1.0.0.1'option server_group 'GW'option blacklist_ip '0'option port '853'option type 'tls'option no_check_certificate '0'config serveroption enabled '1'option name 'Open DNS'option ip '208.67.222.222'option server_group 'GW'option blacklist_ip '0'option port '853'option type 'tls'option no_check_certificate '0'config serveroption enabled '1'option name 'Open DNS'option ip '208.67.220.220'option server_group 'GW'option blacklist_ip '0'option port '853'option type 'tls'option no_check_certificate '0'config serveroption enabled '1'option name '威瑞信 DNS'option ip '64.6.64.6'option server_group 'GW'option blacklist_ip '0'option port '853'option type 'tls'option no_check_certificate '0'config serveroption enabled '1'option name '威瑞信 DNS'option ip '64.6.65.6'option server_group 'GW'option blacklist_ip '0'option port '853'option type 'tls'option no_check_certificate '0'config serveroption enabled '1'option name 'Google DNS'option ip '2001:4860:4860::8888'option type 'udp'option server_group 'GW'option blacklist_ip '0'config serveroption enabled '1'option name 'Google DNS'option ip '2001:4860:4860::8844'option type 'udp'option server_group 'GW'option blacklist_ip '0'config serveroption enabled '1'option name 'Cloudflare DNS'option ip '2606:4700:4700::1111'option type 'udp'option server_group 'GW'option blacklist_ip '0'config serveroption enabled '1'option name 'Cloudflare DNS'option ip '2606:4700:4700::1001'option type 'udp'option server_group 'GW'option blacklist_ip '0'

adguardhome 配置:
file: /etc/AdGuardHome.yaml
用户名: admin 密码: adminadmin

bind_host: 0.0.0.0
bind_port: 3000
beta_bind_port: 0
users:- name: adminpassword: $2a$10$tK6Zv2oPzAm.IyqSBXmhNu2VALRNGO/FaiFqfEV60Ne9t.MHygUse
auth_attempts: 5
block_auth_min: 15
http_proxy: ""
language: ""
debug_pprof: false
web_session_ttl: 720
dns:bind_hosts:- 0.0.0.0port: 53statistics_interval: 7querylog_enabled: truequerylog_file_enabled: truequerylog_interval: 168hquerylog_size_memory: 1000anonymize_client_ip: falseprotection_enabled: trueblocking_mode: nxdomainblocking_ipv4: ""blocking_ipv6: ""blocked_response_ttl: 10parental_block_host: family-block.dns.adguard.comsafebrowsing_block_host: standard-block.dns.adguard.comratelimit: 0ratelimit_whitelist: []refuse_any: trueupstream_dns:- 127.0.0.1:7874upstream_dns_file: ""bootstrap_dns:- 127.0.0.1:6913all_servers: truefastest_addr: falsefastest_timeout: 1sallowed_clients: []disallowed_clients: []blocked_hosts:- version.bind- id.server- hostname.bindtrusted_proxies:- 127.0.0.0/8- ::1/128cache_size: 0cache_ttl_min: 0cache_ttl_max: 0cache_optimistic: falsebogus_nxdomain: []aaaa_disabled: falseenable_dnssec: falseedns_client_subnet: falsemax_goroutines: 300handle_ddr: trueipset: []ipset_file: ""filtering_enabled: truefilters_update_interval: 24parental_enabled: falsesafesearch_enabled: falsesafebrowsing_enabled: falsesafebrowsing_cache_size: 1048576safesearch_cache_size: 1048576parental_cache_size: 1048576cache_time: 30rewrites: []blocked_services:- tiktokupstream_timeout: 10sprivate_networks: []use_private_ptr_resolvers: truelocal_ptr_upstreams: []serve_http3: falseuse_http3_upstreams: false
tls:enabled: falseserver_name: ""force_https: falseport_https: 443port_dns_over_tls: 853port_dns_over_quic: 853port_dnscrypt: 0dnscrypt_config_file: ""allow_unencrypted_doh: falsecertificate_chain: ""private_key: ""certificate_path: ""private_key_path: ""strict_sni_check: false
filters:- enabled: trueurl: https://adguardteam.github.io/AdGuardSDNSFilter/Filters/filter.txtname: AdGuard DNS filterid: 1628750870- enabled: trueurl: https://anti-ad.net/easylist.txtname: 'CHN: anti-AD'id: 1628750871- enabled: trueurl: https://adaway.org/hosts.txtname: AdAway Default Blocklistid: 1666183470- enabled: trueurl: https://someonewhocares.org/hosts/zero/hostsname: Dan Pollock's Listid: 1666183471- enabled: trueurl: https://raw.githubusercontent.com/DandelionSprout/adfilt/master/GameConsoleAdblockList.txtname: Game Console Adblock Listid: 1666183472- enabled: trueurl: https://abp.oisd.nl/basic/name: OISD Blocklist Basicid: 1666183473- enabled: trueurl: https://pgl.yoyo.org/adservers/serverlist.php?hostformat=adblockplus&showintro=1&mimetype=plaintextname: Peter Lowe's Listid: 1666183474- enabled: trueurl: https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV-AGH.txtname: Perflyst and Dandelion Sprout's Smart-TV Blocklistid: 1666183475- enabled: trueurl: https://raw.githubusercontent.com/DandelionSprout/adfilt/master/Alternate%20versions%20Anti-Malware%20List/AntiMalwareAdGuardHome.txtname: Dandelion Sprout's Anti-Malware Listid: 1666183476- enabled: trueurl: https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txtname: NoCoin Filter Listid: 1666183477- enabled: trueurl: https://raw.githubusercontent.com/durablenapkin/scamblocklist/master/adguard.txtname: Scam Blocklist by DurableNapkinid: 1666183478- enabled: trueurl: https://raw.githubusercontent.com/mitchellkrogza/The-Big-List-of-Hacked-Malware-Web-Sites/master/hostsname: The Big List of Hacked Malware Web Sitesid: 1666183479- enabled: trueurl: https://malware-filter.gitlab.io/malware-filter/urlhaus-filter-agh-online.txtname: Online Malicious URL Blocklistid: 1666183480- enabled: trueurl: https://raw.githubusercontent.com/ABPindo/indonesianadblockrules/master/subscriptions/abpindo.txtname: 'IDN: ABPindo'id: 1666183481- enabled: trueurl: https://raw.githubusercontent.com/DRSDavidSoft/additional-hosts/master/domains/blacklist/unwanted-iranian.txtname: 'IRN: Unwanted Iranian domains'id: 1666183482- enabled: trueurl: https://filtri-dns.ga/filtri.txtname: 'ITA: Filtri-DNS'id: 1666183483- enabled: trueurl: https://raw.githubusercontent.com/yous/YousList/master/hosts.txtname: 'KOR: YousList'id: 1666183484- enabled: trueurl: https://raw.githubusercontent.com/cchevy/macedonian-pi-hole-blocklist/master/hosts.txtname: 'MKD: Macedonian Pi-hole Blocklist'id: 1666183485- enabled: trueurl: https://easylist-downloads.adblockplus.org/easylistdutch.txtname: 'NLD: Easylist'id: 1666183486- enabled: trueurl: https://raw.githubusercontent.com/DandelionSprout/adfilt/master/NorwegianExperimentalList%20alternate%20versions/NordicFiltersAdGuardHome.txtname: 'NOR: Dandelion Sprouts nordiske filtre'id: 1666183487- enabled: trueurl: https://raw.githubusercontent.com/MajkiIT/polish-ads-filter/master/polish-pihole-filters/hostfile.txtname: 'POL: Polish filters for Pi hole'id: 1666183488- enabled: trueurl: https://raw.githubusercontent.com/lassekongo83/Frellwits-filter-lists/master/Frellwits-Swedish-Hosts-File.txtname: 'SWE: Frellwit''s Swedish Hosts File'id: 1666183489- enabled: trueurl: https://abpvn.com/android/abpvn.txtname: 'VNM: ABPVN List'id: 1666183490- enabled: trueurl: https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txtname: WindowsSpyBlocker - Hosts spy rulesid: 1666183491- enabled: trueurl: https://gitee.com/xinggsf/Adblock-Rule/raw/master/rule.txtname: AdGuard Ruleid: 1666188951- enabled: trueurl: https://gitee.com/xinggsf/Adblock-Rule/raw/master/mv.txtname: AdGuard MVid: 1666188952- enabled: trueurl: http://sub.adtchrome.com/adt-chinalist-easylist.txtname: China Eazy Listid: 1666188954- enabled: trueurl: https://www.i-dont-care-about-cookies.eu/abp/name: I don't Care About Cookiesid: 1666188955- enabled: trueurl: https://gist.githubusercontent.com/Ewpratten/a25ae63a7200c02c850fede2f32453cf/raw/b9318009399b99e822515d388b8458557d828c37/hosts-yt-adsname: Youtube Ads Listid: 1666188956- enabled: trueurl: https://malware-filter.gitlab.io/malware-filter/phishing-filter-agh.txtname: Phishing URL Blocklist (PhishTank and OpenPhish)id: 1668442517- enabled: trueurl: https://raw.githubusercontent.com/AssoEchap/stalkerware-indicators/master/generated/hostsname: Stalkerware Indicators Listid: 1668442518- enabled: trueurl: https://malware-filter.gitlab.io/malware-filter/urlhaus-filter-agh.txtname: Malicious URL Blocklist (URLHaus)id: 1668442519- enabled: trueurl: https://raw.githubusercontent.com/bkrucarci/turk-adlist/master/hostsname: 'TUR: turk-adlist'id: 1668442521- enabled: trueurl: https://raw.githubusercontent.com/ABPindo/indonesianadblockrules/master/subscriptions/aghome.txtname: 'IDN: ABPindo'id: 1668442522- enabled: trueurl: https://raw.githubusercontent.com/MasterKia/PersianBlocker/main/PersianBlockerHosts.txtname: 'IRN: PersianBlocker list'id: 1668442523- enabled: trueurl: https://raw.githubusercontent.com/Cats-Team/AdRules/main/dns.txtname: 'CHN: AdRules DNS List'id: 1668442524- enabled: trueurl: https://raw.githubusercontent.com/StevenBlack/hosts/master/hostsname: Steven Black's Listid: 1668442525- enabled: trueurl: https://abp.oisd.nl/name: OISD Blocklist Fullid: 1668442526- enabled: trueurl: https://badmojr.gitlab.io/1hosts/Lite/adblock.txtname: 1Hosts (Lite)id: 1668442527- enabled: trueurl: https://block.energized.pro/spark/formats/filtername: Energized Sparkid: 1668442528- enabled: trueurl: https://raw.githubusercontent.com/notracking/hosts-blocklists/master/adblock/adblock.txtname: The NoTracking blocklistid: 1668442529- enabled: trueurl: https://easylist-downloads.adblockplus.org/easylist.txtname: EasyListid: 1669274963- enabled: trueurl: https://easylist-downloads.adblockplus.org/easylistchina.txtname: EasyList Chinaid: 1669274964- enabled: trueurl: https://easylist-downloads.adblockplus.org/easyprivacy.txtname: EasyPrivacyid: 1669274965- enabled: trueurl: https://raw.githubusercontent.com/privacy-protection-tools/anti-AD/master/anti-ad-easylist.txtname: Anti-ADid: 1669274967- enabled: trueurl: https://raw.githubusercontent.com/adbyby/xwhyc-rules/master/lazy.txtname: AdbybyLazyid: 1669274968- enabled: trueurl: https://raw.githubusercontent.com/adbyby/xwhyc-rules/master/video.txtname: AdbybyVideoid: 1669274969- enabled: trueurl: https://raw.githubusercontent.com/banbendalao/ADgk/master/ADgk.txtname: ADgkid: 1669274971- enabled: trueurl: https://raw.githubusercontent.com/banbendalao/ADgk/master/kill-baidu-ad.txtname: BaiduBaiJiaid: 1669274972- enabled: trueurl: https://raw.githubusercontent.com/zsakvo/AdGuard-Custom-Rule/master/rule/zhihu.txtname: ZhihuStandardid: 1669274973- enabled: trueurl: https://raw.githubusercontent.com/zsakvo/AdGuard-Custom-Rule/master/rule/zhihu-strict.txtname: ZhihuStrictid: 1669274974- enabled: trueurl: https://raw.githubusercontent.com/jdlingyu/ad-wars/master/hostsname: Dashengid: 1669274976- enabled: trueurl: https://raw.githubusercontent.com/BlueSkyXN/AdGuardHomeRules/master/all.txtname: BlueSkyXNid: 1669274977- enabled: trueurl: https://raw.githubusercontent.com/cjx82630/cjxlist/master/cjx-annoyance.txtname: CJX's Annoyance Listid: 1669274978- enabled: trueurl: http://winhelp2002.mvps.org/hosts.txtname: Mvpsid: 1669362850- enabled: trueurl: https://hblock.molinero.dev/hostsname: Hblockid: 1669362852- enabled: trueurl: https://raw.githubusercontent.com/VeleSila/yhosts/master/hosts.txtname: yhostsid: 1669363016
whitelist_filters:- enabled: trueurl: https://raw.githubusercontent.com/Tunglies/TorrentTracker/main/domains.txtname: qBbittorrentTrackersDomainid: 1667976469
user_rules:- '@@||www.bing.com^$importan'- '@@||apple.com'- '@@||www.bing.com^$important'- '@@||cn.bing.com^$important'- '@@||t.co^'- '@@||supes.top^$important'
dhcp:enabled: falseinterface_name: br-lanlocal_domain_name: landhcpv4:gateway_ip: 192.168.1.1subnet_mask: 255.255.255.0range_start: 192.168.1.200range_end: 192.168.1.254lease_duration: 7200icmp_timeout_msec: 1000options: []dhcpv6:range_start: 2001::1lease_duration: 7200ra_slaac_only: falsera_allow_slaac: false
clients:runtime_sources:whois: truearp: truerdns: truedhcp: truehosts: truepersistent: []
log_file: ""
log_max_backups: 0
log_max_size: 100
log_max_age: 3
log_compress: false
log_localtime: false
verbose: false
os:group: ""user: ""rlimit_nofile: 0
schema_version: 14

Openwrt 分流-缓存-去广告相关推荐

  1. 【AdGuard Home】轻松实现全屋去广告与追踪,AdGuard Home助力更安全浏览体验

    序言 在当今越来越数字化的社会中,广告和追踪器成为了许多用户最不喜欢的东西之一.用户访问网站或使用应用程序时,经常会被恼人的广告和追踪器所干扰,甚至可能泄露个人隐私.这就是为什么广告拦截 / 反追踪插 ...

  2. html怎么去广告,净网大师怎么不能去广告了? - 实用方法教程 - 画夹插件网

    我们很多人对去广告都有需要,确切的说是一种刚需.我个人不是特别排斥广告,有些有创意的广告还是不错的,但是那种狗比膏药似的广告就比较惹人讨厌.去广告有着充分的利益空间.adblock plus的默认不屏 ...

  3. dnsmasq反DNS劫持、DNS污染、去广告

    通过配置文件/etc/dnsmasq.conf实现 DNS反劫持: bogus-nxdomain=x.x.x.x x.x.x.x是劫持域名的服务器地址,可以通过ping一个不存在的域名得到.如ping ...

  4. ehviewer_ehviewer下载预约_ehviewer免登陆版最新v1.0.30下载预约去广告清爽版_游戏吧...

    ehviewer是小编给各位小伙伴精心准备的最新去广告清爽版本,这个版本的最大特色就是可以选择免登录直接进入,本作是一款绅士必备的漫画阅读软件.相信用过的小伙伴都非常喜欢.需要的快点来看看吧. ehv ...

  5. 迅雷7优化,删除组件,去广告,屏蔽上传,高速通道,下载

    迅雷(Thunder)7.1.8.2300,可以开启高速通道, 压缩包里有两种安装文件,安装.inf.卸载.inf属于原版,但是不屏蔽上传 安装.bat,安装_Win7x64.bat,卸载.exe不属 ...

  6. 迅雷5极速通用补丁(官方去广告+多专用链支持)

    http://www.ysrh.com/index.php/thunder-jisuqq-vip-noad-plus/ 为方便更多朋友使用,此补丁已在原有基础上升级! 以下内容为原补丁功能简介: 迅雷 ...

  7. 【教程】潘多拉Pandora-SS+多拨+去广告同时运行配置教(斐讯K1)

    开始之前,先给大家上个图 (这是ss+cc+多拨+去广告都搞完了后,路由内还剩余的空间.ps:我的路由没有硬改,依旧是8M的Flash) 这次的不同之处是使用的是潘多拉r450版本固件[下载] 这里是 ...

  8. CSDN插件限时内测,新用户抢永久免费去广告特权!

    经过程序猿哥哥们和产品小姐姐马不停蹄的疯狂加班,CSDN 官方出品的PC浏览器插件–开发者助手 终于正式上线啦!一键万能操作,新标签页极简个性,让你的浏览器更酷更高效!还有超多实用彩蛋功能等你来解锁! ...

  9. CSDN 插件限时内测,新用户抢永久免费去广告特权!

    经过程序猿哥哥们和产品小姐姐马不停蹄的疯狂加班,CSDN 官方出品的PC浏览器插件–开发者助手 终于正式上线啦!一键万能操作,新标签页极简个性,让你的浏览器更酷更高效!还有超多实用彩蛋功能等你来解锁! ...

最新文章

  1. 深入理解DOM事件类型系列第六篇——加载事件
  2. [泰然翻译] cocos2d programming guide翻译(10)
  3. 优化数据库大幅度提高Oracle的性能
  4. iOS开发UI篇 程序启动原理和UIApplication
  5. How is note created - backend implementation
  6. 经典的卷积神经网络简介
  7. 音频服务器未运行怎么办,音频服务未运行怎么办 音频服务未运行解决方法【详细介绍】...
  8. libjpeg(2)
  9. 485通讯线是几芯的_485总线,通讯线的连接
  10. html ul高度自适应,如何让div中的ul元素自适应
  11. 揭秘 OceanBase 勇夺 TPC 榜首的王者攻略!
  12. 电子邮件是html文件吗,如何在电子邮件正文中嵌入HTML文件
  13. 阿里3大营销模型:AIPL、FAST、GROW
  14. 抓包工具charles下载安装(破解版)
  15. CV520直接pin对pin替换 MS520,直接替换,无需修改硬件以及软件
  16. hive相关的example
  17. Java反射机制详解上篇
  18. 数据仓库专题(21):Kimball总线矩阵说明-官方版
  19. java高校墨香文学社管理系统计算机毕业设计MyBatis+系统+LW文档+源码+调试部署
  20. 本周AI热点回顾:百度推出全球首个mRNA疫苗不稳定性解决方案、性能提升20倍:英伟达GPU旗舰A100

热门文章

  1. C语言REPEAT程序,汇编语言定使用WHILE、REPEAT、FOR 和 FORC伪指令定义重复语句块
  2. JS设计模式初识(七)-组合模式
  3. Relevance Vector Machine (RVM)简介
  4. 【Windows10】电脑双屏后无法调节屏幕亮度?解决方法
  5. 工业大数据漫谈3:什么是工业大数据?
  6. 漏洞payload 靶机_【HTB系列】靶机Bitlab的渗透测试
  7. Cesium 点位聚合
  8. Kotlin基础语法之 ==和===的区别
  9. linux ar -x64,Linux ar 命令 command not found ar 命令详解 ar 命令未找到 ar 命令安装 - CommandNotFound ⚡️ 坑否...
  10. 核函数和核矩阵【转】