Skip to content

Commit

Permalink
Inbound worker should fill context outbounds info
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhan6665 committed May 26, 2024
1 parent ca07a70 commit 0a3c449
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/proxyman/inbound/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 0a3c449

Please sign in to comment.