From 76bf0fecebba61e7f6bf258a212cd2314f0f4419 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sat, 4 Jun 2022 12:27:25 +0800 Subject: [PATCH] Fix multi-user udp --- shadowaead_2022/service_multi.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shadowaead_2022/service_multi.go b/shadowaead_2022/service_multi.go index 549d2ca..71eec70 100644 --- a/shadowaead_2022/service_multi.go +++ b/shadowaead_2022/service_multi.go @@ -277,6 +277,8 @@ func (s *MultiService[U]) newPacket(ctx context.Context, conn N.PacketConn, buff return err } + buffer.Advance(aes.BlockSize) + session, loaded := s.udpSessions.LoadOrStore(sessionId, func() *serverUDPSession { return s.newUDPSession(uPSK) })