This commit is contained in:
Fangliding
2026-11-26 21:09:20 +08:00
parent 2e9bac5648
commit e04430d18f
8 changed files with 391 additions and 230 deletions
+6 -2
View File
@@ -67,8 +67,12 @@ func (s *ServerUDPSession) EnsureLink(
// don't bind its lifetime to a parent context
sessCtx, cancel := context.WithCancel(context.WithoutCancel(ctx))
inbound := session.InboundFromContext(sessCtx)
if inbound != nil && s.User != nil {
inbound.User = s.User
if inbound != nil {
newInbound := *inbound
if s.User != nil {
newInbound.User = s.User
}
sessCtx = session.ContextWithInbound(sessCtx, &newInbound)
}
var email string
var level uint32