Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

子域名规则问题 #1519

Closed
najloa opened this issue Oct 7, 2023 · 3 comments
Closed

子域名规则问题 #1519

najloa opened this issue Oct 7, 2023 · 3 comments

Comments

@najloa
Copy link

najloa commented Oct 7, 2023

proxy.txt域名为google.com
googlecn.txt域名为dl.google.com

解析域名为国内ip却被添加至代理的ipset集合中:
root@OpenWrt:~# nslookup dl.google.com
Server: 127.0.0.1
Address: 127.0.0.1#53

Name: dl.google.com
Address 1: 180.163.151.33
*** Can't find dl.google.com: No answer
root@OpenWrt:~# ipset list
Name: proxy
Type: hash:net
Revision: 6
Header: family inet hashsize 1024 maxelem 65536 timeout 600
Size in memory: 544
References: 0
Number of entries: 1
Members:
180.163.151.33 timeout 1790

删除了一些无关条目的配置:
server-name smartdns
prefetch-domain yes
serve-expired yes
dnsmasq-lease-file /tmp/dhcp.leases
rr-ttl-min 600
log-size 64K
log-num 1
log-level error
cache-persist yes
cache-file /etc/smartdns/smartdns.cache
proxy-server socks5://127.0.0.1:7893 -name default-proxy
force-qtype-SOA 65
resolv-file /tmp/resolv.conf.d/resolv.conf.auto
bind [::]:53@br-lan
bind [::]:53@lo
server 223.5.5.5 -exclude-default-group -bootstrap-dns
server-https https://dns.alidns.com/dns-query -group AliDNS
server-https https://cloudflare-dns.com/dns-query -group Proxy -exclude-default-group -proxy default-proxy
domain-set -name domain-forwarding-file -file '/etc/smartdns/domain-set/proxy.txt'
domain-rules /domain-set:domain-forwarding-file/ -nameserver Proxy -speed-check-mode none -address #6 -ipset proxy -no-cache
domain-set -name domain-rule-list-cfg0e754b -file '/etc/smartdns/domain-set/googlecn.txt'
domain-rules /domain-set:domain-rule-list-cfg0e754b/ -n AliDNS

版本:1.2023.v43.0.21-1

@PikuZheng
Copy link
Contributor

看看是不是 #1512 相同的问题

@najloa
Copy link
Author

najloa commented Oct 7, 2023

看看是不是#1512相同的问题

应该不是优先级问题。我又试了好多次,目前的方法是为domain-rule-list-cfg0e754b分配一个不存在的ipset名,这样似乎就能解决alidns解析的ip被错误加入ipset的问题

@PikuZheng
Copy link
Contributor

那就是符合预期了。domain-rule实际处理上是拆分成若干普通规则的。上面的配置相当于 google.com 有ipset规则。但是 dl.google.com没有单独的ipset规则,所以会匹配到google.com。
如果需要排除,可以考虑单独设置 ipset /dl.google.com/-

@najloa najloa closed this as completed Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants