Skip to content

Commit

Permalink
WireGuard inbound: Add missing inbound session information back
Browse files Browse the repository at this point in the history
  • Loading branch information
Fangliding authored Dec 6, 2024
1 parent ae62a0f commit 20d16b3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions proxy/wireguard/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,15 @@ func (s *Server) forwardConnection(dest net.Destination, conn net.Conn) {
Reason: "",
})

if s.info.inboundTag != nil {
ctx = session.ContextWithInbound(ctx, s.info.inboundTag)
}

// what's this?
// Session information should not be shared between different connections
// why reuse them in server level? This will cause incorrect destoverride and unexpected routing behavior.
// Disable it temporarily. Maybe s.info should be removed.

// if s.info.inboundTag != nil {
// ctx = session.ContextWithInbound(ctx, s.info.inboundTag)
// }
// if s.info.outboundTag != nil {
// ctx = session.ContextWithOutbounds(ctx, []*session.Outbound{s.info.outboundTag})
// }
Expand Down

0 comments on commit 20d16b3

Please sign in to comment.