Compare commits

...

4 Commits

Author SHA1 Message Date
mercury 21b7a4816f fix bot dump when telegram logs are empty 2024-11-18 00:31:53 +04:00
mercury 51ecb815ba fix domain installation on first launch 2024-11-17 19:32:54 +04:00
mercury 66cee61d41 allow telegram ip 2024-11-17 15:08:01 +04:00
mercury 66225917fe fix ip menu 2024-11-16 16:45:36 +04:00
3 changed files with 21 additions and 2 deletions
+16 -1
View File
@@ -1223,6 +1223,7 @@ class Bot
}
}
} catch (Exception $e) {
file_put_contents('/logs/php_error', $e->getMessage());
}
}
@@ -4545,7 +4546,7 @@ DNS-over-HTTPS with IP:
public function denyList($page = 0, $white = 0)
{
$text = 'Menu -> IP -> ' . ($white ? 'white' : 'deny') . ' list';
$text = 'Menu -> IP -> ' . ($white ? 'ignore' : 'block') . 'list';
$domains = $this->getPacConf()[$white ? 'white' : 'deny'] ?: [];
$all = (int) ceil(count($domains) / $this->limit);
$page = min($page, $all - 1);
@@ -4687,6 +4688,20 @@ DNS-over-HTTPS with IP:
public function syncDeny()
{
$pac = $this->getPacConf();
if ($r = fopen('/logs/nginx_tlgrm_access', 'r')) {
while (feof($r) === false) {
$l = fgets($r);
if (preg_match('~(\d+\.\d+\.\d+\.\d+)~', $l, $m)) {
$xr[$m[1]] = true;
}
}
fclose($r);
}
if (!empty($xr)) {
foreach (array_keys($xr) as $v) {
$text .= "allow $v;\n";
}
}
if (!empty($pac['white'])) {
$pac['white'] = array_unique($pac['white']);
sort($pac['white']);
+1 -1
View File
@@ -18,7 +18,7 @@ if (!empty($bot->selfupdate)) {
$bot->offWarp();
}
$bot->dontshowcron = 1;
$bot->adguardSync();
$bot->sslip();
$bot->adguardSync();
$bot->syncDeny();
$bot->cleanDocker();
+4
View File
@@ -1,3 +1,7 @@
18.11.2024 v1.106
- фикс отвала бота при пустых логах телеги
17.11.2024 v1.105
- фикс установки домена при первом запуске
16.11.2024 v1.104
- единая механика закрепления бэкапа
- фикс текста уведомления о новой версии