Fix hysteria inbound context

This commit is contained in:
世界 2023-07-11 20:58:12 +08:00
parent 6879def619
commit 1121517755
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
1 changed files with 1 additions and 0 deletions

View File

@ -283,6 +283,7 @@ func (h *Hysteria) acceptStream(ctx context.Context, conn quic.Connection, strea
metadata.Source = M.SocksaddrFromNet(conn.RemoteAddr()).Unwrap()
metadata.OriginDestination = M.SocksaddrFromNet(conn.LocalAddr()).Unwrap()
metadata.Destination = M.ParseSocksaddrHostPort(request.Host, request.Port).Unwrap()
metadata.User, _ = auth.UserFromContext[string](ctx)
if !request.UDP {
err = hysteria.WriteServerResponse(stream, hysteria.ServerResponse{