Skip to content

Commit

Permalink
Wireguard inboud: Add missing inbound session information back
Browse files Browse the repository at this point in the history
  • Loading branch information
Fangliding authored Nov 23, 2024
1 parent 513f18b commit 54005ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions proxy/wireguard/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (s *Server) Process(ctx context.Context, network net.Network, conn stat.Con
ob := outbounds[len(outbounds)-1]

s.info = routingInfo{
ctx: core.ToBackgroundDetachedContext(ctx),
ctx: ctx,
dispatcher: dispatcher,
inboundTag: session.InboundFromContext(ctx),
outboundTag: ob,
Expand Down Expand Up @@ -133,7 +133,7 @@ func (s *Server) forwardConnection(dest net.Destination, conn net.Conn) {
}
defer conn.Close()

ctx, cancel := context.WithCancel(core.ToBackgroundDetachedContext(s.info.ctx))
ctx, cancel := context.WithCancel(s.info.ctx)
plcy := s.policyManager.ForLevel(0)
timer := signal.CancelAfterInactivity(ctx, cancel, plcy.Timeouts.ConnectionIdle)

Expand Down

0 comments on commit 54005ed

Please sign in to comment.