From 4f4e36e1cbb694c50f9be0df27f4229da524dc84 Mon Sep 17 00:00:00 2001 From: mercury Date: Thu, 28 Nov 2024 15:17:42 +0400 Subject: [PATCH] doh ip exclude for analyze ip --- app/bot.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/bot.php b/app/bot.php index cb08371..82258f2 100644 --- a/app/bot.php +++ b/app/bot.php @@ -4395,6 +4395,17 @@ DNS-over-HTTPS with IP: } fclose($r); } + if ($r = fopen('/logs/nginx_doh_access', 'r')) { + while (feof($r) === false) { + $l = fgets($r); + if (preg_match('~(\d+\.\d+\.\d+\.\d+)~', $l, $m)) { + if (!in_array("{$m[1]}/32", $xr)) { + $xr[] = "{$m[1]}/32"; + } + } + } + fclose($r); + } if ($r = fopen('/logs/xray', 'r')) { while (feof($r) === false) { $l = fgets($r);