🐛修复客户端链接列表的bug
All checks were successful
continuous-integration/drone/tag Build is passing

This commit is contained in:
coward
2024-08-21 14:12:43 +08:00
parent 32f61a0eef
commit 299ec93199
2 changed files with 18 additions and 2 deletions

View File

@@ -80,11 +80,11 @@ func (DashboardApi) ConnectionList(c *gin.Context) {
connections = append(connections, vo.DataTraffic{
Name: clientInfo.Name,
Email: clientInfo.Email,
IpAllocation: clientInfo.IpAllocation,
IpAllocation: ipAllocation,
Online: time.Since(peer.LastHandshakeTime).Minutes() < 3,
ReceiveBytes: utils.FlowCalculation().Parse(peer.TransmitBytes),
TransmitBytes: utils.FlowCalculation().Parse(peer.ReceiveBytes),
ConnectEndpoint: ipAllocation,
ConnectEndpoint: peer.Endpoint.String(),
LastHandAt: peer.LastHandshakeTime.Format("2006-01-02 15:04:05"),
})
}