mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-22 11:23:32 +02:00
Inbound worker should fill context outbounds info
https://github.com/XTLS/Xray-core/issues/3388
This commit is contained in:
parent
ca07a705dc
commit
0a3c449cdf
1 changed files with 3 additions and 4 deletions
|
@ -308,12 +308,11 @@ func (w *udpWorker) callback(b *buf.Buffer, source net.Destination, originalDest
|
|||
sid := session.NewID()
|
||||
ctx = session.ContextWithID(ctx, sid)
|
||||
|
||||
outbounds := []*session.Outbound{{}}
|
||||
if originalDest.IsValid() {
|
||||
outbounds := []*session.Outbound{{
|
||||
Target: originalDest,
|
||||
}}
|
||||
ctx = session.ContextWithOutbounds(ctx, outbounds)
|
||||
outbounds[0].Target = originalDest
|
||||
}
|
||||
ctx = session.ContextWithOutbounds(ctx, outbounds)
|
||||
ctx = session.ContextWithInbound(ctx, &session.Inbound{
|
||||
Source: source,
|
||||
Gateway: net.UDPDestination(w.address, w.port),
|
||||
|
|
Loading…
Reference in a new issue