DNS Host: Removing code that was not being executed and should not be executed. (#4721)

* Removing a piece of code that was not being executed and should not be executed.

* Remove d.dns

---------

Co-authored-by: 风扇滑翔翼 <Fangliding.fshxy@outlook.com>
This commit is contained in:
patterniha 2025-05-15 17:45:03 +03:30 committed by GitHub
parent 30bf7be429
commit 882975ce5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 36 deletions

View file

@ -243,22 +243,6 @@ func (s *DNS) LookupIP(domain string, option dns.IPOption) ([]net.IP, uint32, er
return nil, 0, dns.ErrEmptyResponse
}
// LookupHosts implements dns.HostsLookup.
func (s *DNS) LookupHosts(domain string) *net.Address {
domain = strings.TrimSuffix(domain, ".")
if domain == "" {
return nil
}
// Normalize the FQDN form query
addrs := s.hosts.Lookup(domain, *s.ipOption)
if len(addrs) > 0 {
errors.LogInfo(s.ctx, "domain replaced: ", domain, " -> ", addrs[0].String())
return &addrs[0]
}
return nil
}
func (s *DNS) sortClients(domain string) []*Client {
clients := make([]*Client, 0, len(s.clients))
clientUsed := make([]bool, len(s.clients))