fix: sing/hy2内核流量用户为空

This commit is contained in:
wyx2685
2025-09-20 23:15:58 +09:00
parent 9bbccf772b
commit 3deccaae00
3 changed files with 20 additions and 0 deletions

View File

@@ -73,6 +73,10 @@ func (x *Xray) GetUserTrafficSlice(tag string, reset bool) ([]panel.UserTraffic,
traffic.UpCounter.Store(0)
traffic.DownCounter.Store(0)
}
if x.users.uidMap[email] == 0 {
c.Delete(email)
return true
}
trafficSlice = append(trafficSlice, panel.UserTraffic{
UID: x.users.uidMap[email],
Upload: up,