mirror of
https://github.com/wyx2685/V2bX.git
synced 2026-02-04 12:40:11 +00:00
fix bug
This commit is contained in:
19
api/api.go
19
api/api.go
@@ -42,16 +42,15 @@ type Client struct {
|
||||
Key string
|
||||
NodeType string
|
||||
//EnableSS2022 bool
|
||||
EnableVless bool
|
||||
EnableXTLS bool
|
||||
SpeedLimit float64
|
||||
DeviceLimit int
|
||||
LocalRuleList []DetectRule
|
||||
RemoteRuleCache *Rule
|
||||
access sync.Mutex
|
||||
NodeInfoRspMd5 [16]byte
|
||||
NodeRuleRspMd5 [16]byte
|
||||
UserListCheckNum int
|
||||
EnableVless bool
|
||||
EnableXTLS bool
|
||||
SpeedLimit float64
|
||||
DeviceLimit int
|
||||
LocalRuleList []DetectRule
|
||||
RemoteRuleCache *Rule
|
||||
access sync.Mutex
|
||||
NodeInfoRspMd5 [16]byte
|
||||
NodeRuleRspMd5 [16]byte
|
||||
}
|
||||
|
||||
func New(apiConfig *Config) API {
|
||||
|
||||
10
api/user.go
10
api/user.go
@@ -69,16 +69,6 @@ func (c *Client) GetUserList() (UserList *[]UserInfo, err error) {
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unmarshal userlist error: %s", err)
|
||||
}
|
||||
l := len(userList.Data)
|
||||
checkNum := userList.Data[l-1].UID + userList.Data[l/2-1].UID +
|
||||
userList.Data[l/3-1].UID + userList.Data[l/4-1].UID +
|
||||
userList.Data[l/5-1].UID + userList.Data[0].UID
|
||||
if c.UserListCheckNum != 0 {
|
||||
if c.UserListCheckNum == checkNum {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
c.UserListCheckNum = checkNum
|
||||
return &userList.Data, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user