Wireguard inboud: Add missing inbound session information back

This commit is contained in:
风扇滑翔翼 2024-11-23 10:29:22 +00:00 committed by GitHub
parent 513f18bf53
commit 8996eb6240
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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})
// }