Browse Source

Fix: Context without proper session

close https://github.com/XTLS/Xray-core/issues/383
pull/396/head
JimhHan 4 years ago
parent
commit
32713bcc0e
No known key found for this signature in database
GPG Key ID: 48D5D7CF95157AC5
  1. 3
      app/dns/dohdns.go

3
app/dns/dohdns.go

@ -61,7 +61,8 @@ func NewDoHNameServer(url *url.URL, dispatcher routing.Dispatcher, clientIP net.
return nil, err
}
dispatcherCtx = session.ContextWithContent(dispatcherCtx, &session.Content{Protocol: "tls"})
dispatcherCtx = session.ContextWithContent(dispatcherCtx, session.ContentFromContext(ctx))
dispatcherCtx = session.ContextWithInbound(dispatcherCtx, session.InboundFromContext(ctx))
dispatcherCtx = log.ContextWithAccessMessage(dispatcherCtx, &log.AccessMessage{
From: "DoH",
To: s.dohURL,

Loading…
Cancel
Save