mirror of https://github.com/XTLS/Xray-core
Inbound worker should fill context outbounds info
https://github.com/XTLS/Xray-core/issues/3388pull/3396/head
parent
ca07a705dc
commit
0a3c449cdf
|
@ -308,12 +308,11 @@ func (w *udpWorker) callback(b *buf.Buffer, source net.Destination, originalDest
|
||||||
sid := session.NewID()
|
sid := session.NewID()
|
||||||
ctx = session.ContextWithID(ctx, sid)
|
ctx = session.ContextWithID(ctx, sid)
|
||||||
|
|
||||||
|
outbounds := []*session.Outbound{{}}
|
||||||
if originalDest.IsValid() {
|
if originalDest.IsValid() {
|
||||||
outbounds := []*session.Outbound{{
|
outbounds[0].Target = originalDest
|
||||||
Target: originalDest,
|
|
||||||
}}
|
|
||||||
ctx = session.ContextWithOutbounds(ctx, outbounds)
|
|
||||||
}
|
}
|
||||||
|
ctx = session.ContextWithOutbounds(ctx, outbounds)
|
||||||
ctx = session.ContextWithInbound(ctx, &session.Inbound{
|
ctx = session.ContextWithInbound(ctx, &session.Inbound{
|
||||||
Source: source,
|
Source: source,
|
||||||
Gateway: net.UDPDestination(w.address, w.port),
|
Gateway: net.UDPDestination(w.address, w.port),
|
||||||
|
|
Loading…
Reference in New Issue