Skip to content

Commit

Permalink
Fix: Context without proper session
Browse files Browse the repository at this point in the history
close #383
  • Loading branch information
JimhHan authored and JimhHan committed Mar 17, 2021
1 parent 9dec65e commit 32713bc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/dns/dohdns.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 32713bc

Please sign in to comment.