mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-05-12 07:08:41 +00:00
Fix: DNS query log
This commit is contained in:
parent
9b93b90fa9
commit
41d3f31447
5 changed files with 10 additions and 29 deletions
|
@ -80,6 +80,12 @@ func NewDoHNameServer(url *url.URL, dispatcher routing.Dispatcher) (*DoHNameServ
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
log.Record(&log.AccessMessage{
|
||||
From: "DoH",
|
||||
To: s.dohURL,
|
||||
Status: log.AccessAccepted,
|
||||
Detour: "local",
|
||||
})
|
||||
|
||||
cc := common.ChainedClosable{}
|
||||
if cw, ok := link.Writer.(common.Closable); ok {
|
||||
|
@ -372,6 +378,7 @@ func (s *DoHNameServer) QueryIP(ctx context.Context, domain string, clientIP net
|
|||
ips, err := s.findIPsForDomain(fqdn, option)
|
||||
if err != errRecordNotFound {
|
||||
newError(s.name, " cache HIT ", domain, " -> ", ips).Base(err).AtDebug().WriteToLog()
|
||||
log.Record(&log.DNSLog{s.name, domain, ips, log.DNSCacheHit, 0, err})
|
||||
return ips, err
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue