Flow display and user login and rate limit bug

This commit is contained in:
刘河
2019-03-26 11:13:07 +08:00
parent 2a5a45a700
commit 7637cd448e
14 changed files with 164 additions and 17 deletions

View File

@@ -227,7 +227,7 @@ func GetTunnel(start, length int, typeVal string, clientId int, search string) (
for _, key := range keys {
if value, ok := file.GetCsvDb().Tasks.Load(key); ok {
v := value.(*file.Tunnel)
if (typeVal != "" && v.Mode != typeVal) || (typeVal == "" && clientId != v.Client.Id) {
if (typeVal != "" && v.Mode != typeVal || (clientId != 0 && v.Client.Id != clientId)) || (typeVal == "" && clientId != v.Client.Id) {
continue
}
if search != "" && !(v.Id == common.GetIntNoErrByStr(search) || v.Port == common.GetIntNoErrByStr(search) || strings.Contains(v.Password, search) || strings.Contains(v.Remark, search)) {