mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-07-03 10:18:42 +00:00
Loopback outbound: Fix potential nil InboundFromContext (#5836)
Fixes https://github.com/XTLS/Xray-core/issues/5710
This commit is contained in:
@@ -46,6 +46,9 @@ func (l *Loopback) Process(ctx context.Context, link *transport.Link, _ internet
|
|||||||
ctx = session.ContextWithContent(ctx, content)
|
ctx = session.ContextWithContent(ctx, content)
|
||||||
|
|
||||||
inbound := session.InboundFromContext(ctx)
|
inbound := session.InboundFromContext(ctx)
|
||||||
|
if inbound == nil {
|
||||||
|
inbound = &session.Inbound{}
|
||||||
|
}
|
||||||
|
|
||||||
inbound.Tag = l.config.InboundTag
|
inbound.Tag = l.config.InboundTag
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user