smartdns icon indicating copy to clipboard operation
smartdns copied to clipboard

可能 Cache 中存在某些异常,仅有 Apple App Store 受到了影响

Open CallMeR opened this issue 5 months ago • 21 comments

问题现象

当 SmartDNS 长时间运行(1~3天不等),打开 Apple App Store 会显示网络异常,必须多次点刷新 App ,或者重启 SmartDNS 才能回复 App Store 的访问。

我查看了日志,解析部分的 debug 没有 error 或者 waring ,均为正常解析,也尝试了去掉广告屏蔽列表,问题依旧。

或者让 Dnsmasq 不监听 53 端口,直接让 SmartDNS 监听 53 端口,该现象更为稳定复现,有时 12 小时内即可复现。

如果设置了 serve-expired yes ,该问题也能复现,但时间至少需要 1 天以上。

运行环境

  1. 固件型号

Debian12 x86_64

  1. 运营商

不相关

  1. smartdns来源以及版本

smartdns.1.2024.06.12-2222.x86_64-linux-all.tar.gz

  1. 涉及的配置(注意去除个人相关信息)

其中 x.home.arpa 为内网域名,172.16.1.1 为主路由地址,主路由已经设置了放行来自 SmartDNS 服务器地址到任意地址 53 端口的流量。

conf-file /etc/smartdns.d/*.conf

cache-file /tmp/smartdns.cache

log-level notice

bind [::]:6053@lo
bind-tcp [::]:6053@lo

prefetch-domain yes

rr-ttl-min 60
rr-ttl-max 28800
rr-ttl-reply-max 14400

force-qtype-SOA 65
max-query-limit 1024
max-reply-ip-num 24

server 172.16.1.1 -group intranet -exclude-default-group
nameserver /x.home.arpa/intranet
domain-rules /x.home.arpa/ -speed-check-mode none -no-cache

server-tcp 223.5.5.5 -bootstrap-dns
server-tcp 52.80.66.66 -bootstrap-dns
server-tcp 2400:3200::1 -bootstrap-dns
server-tcp 2400:7fc0:849e:200::4 -bootstrap-dns

server-tls dot.pub
server-tls dns.alidns.com
server-tls dot-pure.onedns.net

server-https https://doh.pub/dns-query
server-https https://dns.alidns.com/dns-query
server-https https://doh-pure.onedns.net/dns-query

重现步骤

  1. 上游DNS配置。

除了主配置文件中的上游,还用了我自己写的 SmartDNS CN 域名加速脚本来生成配置。

https://gitee.com/callmer/smartdns_china_list_installer

server 223.5.5.5       -group flash -exclude-default-group
server 180.184.1.1     -group flash -exclude-default-group
server 119.29.29.29    -group flash -exclude-default-group
server 114.114.114.114 -group flash -exclude-default-group
server 2402:4e00::     -group flash -exclude-default-group
server 2400:3200::1    -group flash -exclude-default-group

每天自动获取 Adlist 并执行一次域名加速脚本(加速脚本中有重启 SmartDNS 的功能)

20 9 * * * /usr/bin/curl --retry-connrefused --retry 5 --retry-delay 5 --retry-max-time 60 -fsSLR -o /etc/smartdns.d/anti-ad.smartdns.conf https://anti-ad.net/anti-ad-for-smartdns.conf

30 9 * * * /usr/bin/bash /opt/smartdns-plugin.sh
  1. 访问的域名。
    Apple App Store 的域名

CallMeR avatar Sep 03 '24 03:09 CallMeR