test: Add vless encryption

This commit is contained in:
wyx2685
2025-09-12 14:26:58 +09:00
parent 0824bf7a4e
commit 10f66b57ea
7 changed files with 171 additions and 41 deletions

View File

@@ -8,7 +8,7 @@ import (
)
func (c *Controller) reportUserTrafficTask() (err error) {
userTraffic, err := c.server.GetUserTrafficSlice(c.tag, true)
userTraffic, _ := c.server.GetUserTrafficSlice(c.tag, true)
if len(userTraffic) > 0 {
err = c.apiClient.ReportUserTraffic(userTraffic)
if err != nil {
@@ -18,6 +18,7 @@ func (c *Controller) reportUserTrafficTask() (err error) {
}).Info("Report user traffic failed")
} else {
log.WithField("tag", c.tag).Infof("Report %d users traffic", len(userTraffic))
log.WithField("tag", c.tag).Debugf("User traffic: %+v", userTraffic)
}
}
@@ -50,6 +51,7 @@ func (c *Controller) reportUserTrafficTask() (err error) {
}).Info("Report online users failed")
} else {
log.WithField("tag", c.tag).Infof("Total %d online users, %d Reported", len(*onlineDevice), len(result))
log.WithField("tag", c.tag).Debugf("Online users: %+v", data)
}
}