Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| baaf0e2d01 | |||
| be8bec6a7d |
+49
-2
@@ -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;
|
||||
}
|
||||
@@ -3595,12 +3641,13 @@ DNS-over-HTTPS with IP:
|
||||
preg_match('~^camouflage_secret[^\n]+?"([^"]+)*"~sm', $ocserv, $m);
|
||||
$cs = $m[1];
|
||||
preg_match('~^dns = ([^\n]+)~sm', $ocserv, $m);
|
||||
$dns = $m[1];
|
||||
$dns = $m[1];
|
||||
$pass = htmlspecialchars($pac['ocserv']);
|
||||
$text[] = "Menu -> OpenConnect";
|
||||
if (!empty($m[1])) {
|
||||
$text[] = "<code>https://oc.{$pac['domain']}/?$cs</code>";
|
||||
}
|
||||
$text[] = "password: <span class='tg-spoiler'>{$pac['ocserv']}</span>";
|
||||
$text[] = "password: <span class='tg-spoiler'>$pass</span>";
|
||||
$data[] = [
|
||||
[
|
||||
'text' => $this->i18n('change secret'),
|
||||
|
||||
Reference in New Issue
Block a user