mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 12:40:11 +00:00
update
refactor limiter fix getLink bug add connection limit move limit config to ControllerConfig del dynamic speed limit (next version will be re add) del online ip sync (next version will be re add)
This commit is contained in:
18
core/user.go
18
core/user.go
@@ -3,8 +3,6 @@ package core
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/Yuzuki616/V2bX/api/panel"
|
||||
"github.com/Yuzuki616/V2bX/core/app/dispatcher"
|
||||
"github.com/xtls/xray-core/common/protocol"
|
||||
"github.com/xtls/xray-core/proxy"
|
||||
)
|
||||
@@ -79,19 +77,3 @@ func (p *Core) GetUserTraffic(email string, reset bool) (up int64, down int64) {
|
||||
}
|
||||
return up, down
|
||||
}
|
||||
|
||||
func (p *Core) AddUserSpeedLimit(tag string, user *panel.UserInfo, speedLimit int, expire int64) error {
|
||||
return p.dispatcher.Limiter.AddDynamicSpeedLimit(tag, user, speedLimit, expire)
|
||||
}
|
||||
|
||||
func (p *Core) ListOnlineIp(tag string) ([]dispatcher.UserIpList, error) {
|
||||
return p.dispatcher.Limiter.ListOnlineUserIp(tag)
|
||||
}
|
||||
|
||||
func (p *Core) UpdateOnlineIp(tag string, ips []dispatcher.UserIpList) {
|
||||
p.dispatcher.Limiter.UpdateOnlineUserIP(tag, ips)
|
||||
}
|
||||
|
||||
func (p *Core) ClearOnlineIp(tag string) {
|
||||
p.dispatcher.Limiter.ClearOnlineUserIpAndSpeedLimiter(tag)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user