allow telegram ip

This commit is contained in:
mercury
2024-11-17 15:08:01 +04:00
parent 66225917fe
commit 66cee61d41
+12
View File
@@ -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']);