DNS: New Features

This commit is contained in:
patterniha 2025-04-29 14:15:43 +03:30
parent aa4134f4a6
commit 6436985643
7 changed files with 336 additions and 180 deletions

View file

@ -108,7 +108,7 @@ func New(ctx context.Context, config *Config) (*DNS, error) {
myClientIP = net.IP(ns.ClientIp)
}
disableCache := config.DisableCache
disableCache := config.DisableCache || ns.DisableCache
var tag = defaultTag
if len(ns.Tag) > 0 {
@ -227,6 +227,9 @@ func (s *DNS) LookupIP(domain string, option dns.IPOption) ([]net.IP, uint32, er
}
errs = append(errs, err)
if client.IsFinalQuery() {
break
}
}
if len(errs) > 0 {