clear pac list button

This commit is contained in:
mercury
2024-08-06 21:58:08 +04:00
parent be8bec6a7d
commit baaf0e2d01
2 changed files with 48 additions and 0 deletions
+46
View File
@@ -142,6 +142,12 @@ class Bot
case preg_match('~^/mtproto$~', $this->input['callback'], $m):
$this->mtproto();
break;
case preg_match('~^/deletePac$~', $this->input['callback'], $m):
$this->deletePac();
break;
case preg_match('~^/deletePacYes$~', $this->input['callback'], $m):
$this->deletePacYes();
break;
case preg_match('~^/addCommunityFilter$~', $this->input['callback'], $m):
$this->addCommunityFilter();
break;
@@ -3139,6 +3145,40 @@ DNS-over-HTTPS with IP:
);
}
public function deletePacYes()
{
$c = $this->getPacConf();
unset($c['includelist']);
$this->setPacConf($c);
$this->pacUpdate();
$this->menu('pac');
}
public function deletePac($page = 0)
{
$text = <<<text
Menu -> PAC -> delete all
text;
$data[] = [
[
'text' => $this->i18n('yes'),
'callback_data' => "/deletePacYes",
],
];
$data[] = [
[
'text' => $this->i18n('back'),
'callback_data' => "/pacMenu 0",
],
];
$this->update(
$this->input['chat'],
$this->input['message_id'],
$text,
$data ?: false,
);
}
public function xtlsblock($page = 0)
{
$text[] = "Menu -> " . $this->i18n('xray') . ' -> block list';
@@ -3216,6 +3256,12 @@ DNS-over-HTTPS with IP:
]
];
}
$data[] = [
[
'text' => $this->i18n('delete all'),
'callback_data' => "/deletePac",
],
];
}
return $data;
}
+2
View File
@@ -1,3 +1,5 @@
06.08.2024 v1.41
- возможность очистить РАС лист
03.08.2024 v1.40
- возможность менять MTU для Wireguard/Amnezia
- раздельный qr для AmneziaWG + AmneziaVPN