Skip to content

Commit 70e9485

Browse files
committed
fix: device limiter not working for proxypanel
1 parent 17281c1 commit 70e9485

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

api/proxypanel/proxypanel.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -535,10 +535,11 @@ func (c *APIClient) ParseV2rayUserListResponse(userInfoResponse *json.RawMessage
535535
speedlimit = uint64((user.SpeedLimit * 1000000) / 8)
536536
}
537537
userList[i] = api.UserInfo{
538-
UID: user.UID,
539-
Email: "",
540-
UUID: user.VmessUID,
541-
SpeedLimit: speedlimit,
538+
UID: user.UID,
539+
Email: "",
540+
UUID: user.VmessUID,
541+
DeviceLimit: c.DeviceLimit,
542+
SpeedLimit: speedlimit,
542543
}
543544
}
544545

@@ -562,10 +563,11 @@ func (c *APIClient) ParseTrojanUserListResponse(userInfoResponse *json.RawMessag
562563
speedlimit = uint64((user.SpeedLimit * 1000000) / 8)
563564
}
564565
userList[i] = api.UserInfo{
565-
UID: user.UID,
566-
Email: "",
567-
UUID: user.Password,
568-
SpeedLimit: speedlimit,
566+
UID: user.UID,
567+
Email: "",
568+
UUID: user.Password,
569+
DeviceLimit: c.DeviceLimit,
570+
SpeedLimit: speedlimit,
569571
}
570572
}
571573

0 commit comments

Comments
 (0)