fix analyze ip autoban

This commit is contained in:
mercury
2024-11-21 12:13:02 +04:00
parent 9d53f2896c
commit 253cceb44c
+9 -5
View File
@@ -4362,15 +4362,19 @@ DNS-over-HTTPS with IP:
if (preg_match('~(\d+\.\d+\.\d+\.\d+)~', $l, $m)) {
if ($reverse xor preg_match($regexp, $l)) {
if (is_array($ranges)) {
$flag = true;
foreach ($ranges as $range) {
if (!$this->ipInRange($m[1], $range)) {
$ret[$m[1]][] = [
'title' => $title,
'log' => $l,
];
if ($this->ipInRange($m[1], $range)) {
$flag = false;
break;
}
}
if ($flag) {
$ret[$m[1]][] = [
'title' => $title,
'log' => $l,
];
}
} else {
if ($this->ipInRange($m[1], $ranges)) {
$ret[$m[1]][] = [