Skip to content

Commit 3e7002d

Browse files
FanglidingRPRX
authored andcommitted
WireGuard inbound: Add missing inbound session information back (#4126)
Fixes #4121
1 parent ae62a0f commit 3e7002d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

proxy/wireguard/server.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,15 @@ func (s *Server) forwardConnection(dest net.Destination, conn net.Conn) {
144144
Reason: "",
145145
})
146146

147+
if s.info.inboundTag != nil {
148+
ctx = session.ContextWithInbound(ctx, s.info.inboundTag)
149+
}
150+
147151
// what's this?
148152
// Session information should not be shared between different connections
149153
// why reuse them in server level? This will cause incorrect destoverride and unexpected routing behavior.
150154
// Disable it temporarily. Maybe s.info should be removed.
151155

152-
// if s.info.inboundTag != nil {
153-
// ctx = session.ContextWithInbound(ctx, s.info.inboundTag)
154-
// }
155156
// if s.info.outboundTag != nil {
156157
// ctx = session.ContextWithOutbounds(ctx, []*session.Outbound{s.info.outboundTag})
157158
// }

0 commit comments

Comments
 (0)