mirror of https://github.com/v2ray/v2ray-core
Merge pull request #107 from Loyalsoldier/fix-empty-rules-and-dns
Fix: loging empty rules & DNSpull/2714/head
commit
1ff89cda11
|
@ -379,8 +379,12 @@ func (s *Server) lookupIPInternal(domain string, option IPOption) ([]net.IP, err
|
||||||
domainRules = append(domainRules, fmt.Sprintf("%s(DNS idx:%d)", rule, info.clientIdx))
|
domainRules = append(domainRules, fmt.Sprintf("%s(DNS idx:%d)", rule, info.clientIdx))
|
||||||
matchingDNS = append(matchingDNS, s.clients[info.clientIdx].Name())
|
matchingDNS = append(matchingDNS, s.clients[info.clientIdx].Name())
|
||||||
}
|
}
|
||||||
newError("domain ", domain, " matching following rules: ", domainRules).AtDebug().WriteToLog()
|
if len(domainRules) > 0 {
|
||||||
newError("domain ", domain, " uses following DNS first: ", matchingDNS).AtDebug().WriteToLog()
|
newError("domain ", domain, " matches following rules: ", domainRules).AtDebug().WriteToLog()
|
||||||
|
}
|
||||||
|
if len(matchingDNS) > 0 {
|
||||||
|
newError("domain ", domain, " uses following DNS first: ", matchingDNS).AtDebug().WriteToLog()
|
||||||
|
}
|
||||||
for _, idx := range indices {
|
for _, idx := range indices {
|
||||||
clientIdx := int(s.matcherInfos[idx].clientIdx)
|
clientIdx := int(s.matcherInfos[idx].clientIdx)
|
||||||
matchedClient = s.clients[clientIdx]
|
matchedClient = s.clients[clientIdx]
|
||||||
|
|
Loading…
Reference in New Issue