mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 12:40:11 +00:00
fix: 流量用户为null,xray无法断开失效用户连接
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/InazumaV/V2bX/common/counter"
|
||||
"github.com/InazumaV/V2bX/common/format"
|
||||
vCore "github.com/InazumaV/V2bX/core"
|
||||
"github.com/InazumaV/V2bX/core/xray/app/dispatcher"
|
||||
"github.com/xtls/xray-core/common/protocol"
|
||||
"github.com/xtls/xray-core/proxy"
|
||||
)
|
||||
@@ -43,8 +44,15 @@ func (c *Xray) DelUsers(users []panel.UserInfo, tag string, _ *panel.NodeInfo) e
|
||||
return err
|
||||
}
|
||||
delete(c.users.uidMap, user)
|
||||
c.dispatcher.Counter.Delete(user)
|
||||
c.dispatcher.Wm.RemoveWritersForUser(user)
|
||||
if v, ok := c.dispatcher.Counter.Load(tag); ok {
|
||||
tc := v.(*counter.TrafficCounter)
|
||||
tc.Delete(user)
|
||||
}
|
||||
if v, ok := c.dispatcher.LinkManagers.Load(user); ok {
|
||||
lm := v.(*dispatcher.LinkManager)
|
||||
lm.CloseAll()
|
||||
c.dispatcher.LinkManagers.Delete(user)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user