Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions proxy/hysteria/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,19 @@ func (s *Server) Process(ctx context.Context, network net.Network, conn stat.Con
inbound.Name = "hysteria"
inbound.CanSpliceCopy = 3

iConn := stat.TryUnwrapStatsConn(conn)

var useremail string
var userlevel uint32
type User interface{ User() *protocol.MemoryUser }
if v, ok := conn.(User); ok {
if v, ok := iConn.(User); ok {
inbound.User = v.User()
if inbound.User != nil {
useremail = inbound.User.Email
userlevel = inbound.User.Level
}
}

iConn := stat.TryUnwrapStatsConn(conn)
if _, ok := iConn.(*hysteria.InterUdpConn); ok {
r := io.Reader(conn)
b := make([]byte, MaxUDPSize)
Expand Down