Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 51ecb815ba | |||
| 66cee61d41 | |||
| 66225917fe |
+13
-1
@@ -4545,7 +4545,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 +4687,18 @@ 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);
|
||||
}
|
||||
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
@@ -18,7 +18,7 @@ if (!empty($bot->selfupdate)) {
|
||||
$bot->offWarp();
|
||||
}
|
||||
$bot->dontshowcron = 1;
|
||||
$bot->adguardSync();
|
||||
$bot->sslip();
|
||||
$bot->adguardSync();
|
||||
$bot->syncDeny();
|
||||
$bot->cleanDocker();
|
||||
|
||||
Reference in New Issue
Block a user