mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-10-20 19:12:30 +00:00
Fix DNS route suffix matching
This commit is contained in:
parent
a743632882
commit
decf27c974
2 changed files with 2 additions and 2 deletions
|
|
@ -267,7 +267,7 @@ func (t *DNSTransport) PreferredDomain(domain string) bool {
|
|||
return true
|
||||
}
|
||||
for suffix := range routes {
|
||||
if strings.HasSuffix(domain, suffix) {
|
||||
if mDNS.IsSubDomain(suffix, domain) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ func (t *Transport) PreferredDomain(domain string) bool {
|
|||
if linkDomain.Domain == "." {
|
||||
continue
|
||||
}
|
||||
if strings.HasSuffix(domain, linkDomain.Domain) {
|
||||
if mDNS.IsSubDomain(linkDomain.Domain, domain) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue