support custom node name

This commit is contained in:
yuzuki999
2023-09-13 01:44:03 +08:00
parent 5286dfa244
commit da1870cc88
4 changed files with 33 additions and 18 deletions

View File

@@ -56,7 +56,11 @@ func (c *Controller) Start() error {
if len(c.userList) == 0 {
return errors.New("add users error: not have any user")
}
c.tag = c.buildNodeTag(node)
if len(c.Options.Name) == 0 {
c.tag = c.buildNodeTag(node)
} else {
c.tag = c.Options.Name
}
// add limiter
l := limiter.AddLimiter(c.tag, &c.LimitConfig, c.userList)