update example, add realtime option, fix ip limit bug for packet protocol

This commit is contained in:
yuzuki999
2023-05-17 09:46:52 +08:00
parent c6658c2ce1
commit 48da83fc3d
9 changed files with 114 additions and 100 deletions

View File

@@ -58,11 +58,7 @@ func (c *Controller) Start() error {
c.Tag = c.buildNodeTag()
// add limiter
l := limiter.AddLimiter(c.Tag, &limiter.LimitConfig{
SpeedLimit: c.SpeedLimit,
IpLimit: c.IPLimit,
ConnLimit: c.ConnLimit,
}, c.userList)
l := limiter.AddLimiter(c.Tag, &c.LimitConfig, c.userList)
// add rule limiter
if !c.DisableGetRule {
if err = l.UpdateRule(c.nodeInfo.Rules); err != nil {