Skip to content

fix(hysteria): unwrap stats conn before extracting user#5870

Open
hexband wants to merge 1 commit intoXTLS:mainfrom
hexband:fix-hysteria-user-unwrap
Open

fix(hysteria): unwrap stats conn before extracting user#5870
hexband wants to merge 1 commit intoXTLS:mainfrom
hexband:fix-hysteria-user-unwrap

Conversation

@hexband
Copy link
Copy Markdown

@hexband hexband commented Mar 31, 2026

proxy/hysteria/server.go extracts the user from conn before unwrapping stats wrappers.

If the connection is wrapped, conn.(User) may fail even though the underlying Hysteria connection implements User() *protocol.MemoryUser.

As a result, inbound.User may remain nil and AccessMessage.Email stays empty.

Fix

Unwrap the stats connection first and then extract the user from the underlying connection.

Related to #5868

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant