This commit is contained in:
yuzuki999 2023-07-13 01:19:13 +08:00
parent 65629c0dfb
commit 848c7b014a
5 changed files with 9 additions and 7 deletions

View File

@ -105,7 +105,7 @@ func BuildSSUser(tag string, userInfo *panel.UserInfo, cypher string, serverKey
} }
return &protocol.User{ return &protocol.User{
Level: 0, Level: 0,
Email: tag, Email: BuildUserTag(tag, userInfo.Uuid),
Account: serial.ToTypedMessage(ssAccount), Account: serial.ToTypedMessage(ssAccount),
} }
} }

View File

@ -2,7 +2,7 @@ package conf
type CoreConfig struct { type CoreConfig struct {
Type string `yaml:"Type"` Type string `yaml:"Type"`
XrayConfig *XrayConfig `yaml:"Xray"` XrayConfig *XrayConfig `yaml:"XrayConfig"`
} }
type XrayConfig struct { type XrayConfig struct {

View File

@ -8,7 +8,7 @@ type LogConfig struct {
func NewLogConfig() *LogConfig { func NewLogConfig() *LogConfig {
return &LogConfig{ return &LogConfig{
Level: "none", Level: "warning",
AccessPath: "", AccessPath: "",
ErrorPath: "", ErrorPath: "",
} }

View File

@ -177,7 +177,9 @@ func (c *Controller) nodeInfoMonitor() (err error) {
} }
} }
c.userList = newUserInfo c.userList = newUserInfo
log.WithField("tag", c.Tag). if len(added)+len(deleted) != 0 {
Errorf("%d user deleted, %d user added", len(deleted), len(added)) log.WithField("tag", c.Tag).
Infof("%d user deleted, %d user added", len(deleted), len(added))
}
return nil return nil
} }

View File

@ -28,9 +28,9 @@ func (c *Controller) reportUserTrafficTask() (err error) {
log.WithFields(log.Fields{ log.WithFields(log.Fields{
"tag": c.Tag, "tag": c.Tag,
"err": err, "err": err,
}).Error("Report user traffic faild") }).Info("Report user traffic failed")
} else { } else {
log.WithField("tag", err).Errorf("Report %d online users", len(userTraffic)) log.WithField("tag", c.Tag).Infof("Report %d online users", len(userTraffic))
} }
} }
userTraffic = nil userTraffic = nil