diff --git a/denyip b/denyip index 5f2e118..8eb6e57 100644 Binary files a/denyip and b/denyip differ diff --git a/main.go b/main.go index bef72f1..1397068 100644 --- a/main.go +++ b/main.go @@ -229,6 +229,15 @@ func runMainProcess() { // 主进程逻辑 return 0 }(), len(ProcessedIPMap)) + // 清理 ProcessedIPMap + if len(ProcessedIPMap) >= 1024 { + ProcessedMutex.Lock() // 锁定互斥锁 + ProcessedIPMap = make(map[string]struct{}) // 创建一个新的空 map + ProcessedMutex.Unlock() // 解锁 + log.Println("ProcessedIPMap 已清空") + + } + time.Sleep(1 * time.Second) // 防止高频运行 } }()