Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 486a2c5959 | |||
| 39643bf681 | |||
| 5f1fc6d912 |
+2
-1
@@ -19,4 +19,5 @@ mirror/.env
|
|||||||
update/*
|
update/*
|
||||||
!update/update.sh
|
!update/update.sh
|
||||||
|
|
||||||
override.env
|
override.env
|
||||||
|
override.html
|
||||||
+33
-3
@@ -482,8 +482,8 @@ class Bot
|
|||||||
case preg_match('~^/proxy$~', $this->input['callback'], $m):
|
case preg_match('~^/proxy$~', $this->input['callback'], $m):
|
||||||
$this->proxy();
|
$this->proxy();
|
||||||
break;
|
break;
|
||||||
case preg_match('~^/showpac$~', $this->input['callback'], $m):
|
case preg_match('~^/addOverrideHtml$~', $this->input['callback'], $m):
|
||||||
$this->showpac();
|
$this->addOverrideHtml();
|
||||||
break;
|
break;
|
||||||
case preg_match('~^/export$~', $this->input['callback'], $m):
|
case preg_match('~^/export$~', $this->input['callback'], $m):
|
||||||
$this->exportManual();
|
$this->exportManual();
|
||||||
@@ -809,6 +809,30 @@ class Bot
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function addOverrideHtml()
|
||||||
|
{
|
||||||
|
$r = $this->send(
|
||||||
|
$this->input['chat'],
|
||||||
|
"@{$this->input['username']} attach html",
|
||||||
|
$this->input['message_id'],
|
||||||
|
reply: 'attach html',
|
||||||
|
);
|
||||||
|
$_SESSION['reply'][$r['result']['message_id']] = [
|
||||||
|
'start_message' => $this->input['message_id'],
|
||||||
|
'start_callback' => $this->input['callback_id'],
|
||||||
|
'callback' => 'setOverrideHtml',
|
||||||
|
'args' => [],
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setOverrideHtml()
|
||||||
|
{
|
||||||
|
$r = $this->request('getFile', ['file_id' => $this->input['file_id']]);
|
||||||
|
if (!empty($f = file_get_contents($this->file . $r['result']['file_path']))) {
|
||||||
|
file_put_contents('/app/webapp/override.html', $f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function restartOcserv($conf)
|
public function restartOcserv($conf)
|
||||||
{
|
{
|
||||||
file_put_contents('/config/ocserv.conf', $conf);
|
file_put_contents('/config/ocserv.conf', $conf);
|
||||||
@@ -4852,7 +4876,7 @@ DNS-over-HTTPS with IP:
|
|||||||
copy('/singbox/singbox.zip', $n);
|
copy('/singbox/singbox.zip', $n);
|
||||||
$zip = new ZipArchive();
|
$zip = new ZipArchive();
|
||||||
$zip->open($n, ZipArchive::CREATE);
|
$zip->open($n, ZipArchive::CREATE);
|
||||||
$zip->addFile('/singbox/winsw3.xml', 'winsw3.xml');
|
$zip->addFromString('winsw3.xml', preg_replace('#~url~#', $link, file_get_contents('/singbox/winsw3.xml')));
|
||||||
$zip->close();
|
$zip->close();
|
||||||
header('Content-Disposition: attachment; filename="singbox.zip"');
|
header('Content-Disposition: attachment; filename="singbox.zip"');
|
||||||
echo file_get_contents($n);
|
echo file_get_contents($n);
|
||||||
@@ -5518,6 +5542,12 @@ DNS-over-HTTPS with IP:
|
|||||||
'callback_data' => "/backup",
|
'callback_data' => "/backup",
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
$data[] = [
|
||||||
|
[
|
||||||
|
'text' => $this->i18n('fake html'),
|
||||||
|
'callback_data' => "/addOverrideHtml",
|
||||||
|
],
|
||||||
|
];
|
||||||
$data[] = [
|
$data[] = [
|
||||||
[
|
[
|
||||||
'text' => $this->i18n('logs'),
|
'text' => $this->i18n('logs'),
|
||||||
|
|||||||
@@ -337,4 +337,8 @@ $i = [
|
|||||||
'en' => '🟢 have updates',
|
'en' => '🟢 have updates',
|
||||||
'ru' => '🟢 есть обновления',
|
'ru' => '🟢 есть обновления',
|
||||||
],
|
],
|
||||||
|
'fake html' => [
|
||||||
|
'en' => 'fake html',
|
||||||
|
'ru' => 'фейк заглушка',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
+2
-2
@@ -31,7 +31,7 @@ http {
|
|||||||
|
|
||||||
location / {
|
location / {
|
||||||
root /app;
|
root /app;
|
||||||
index login.html;
|
index override.html login.html;
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/ =404;
|
||||||
}
|
}
|
||||||
location /adguard/ {
|
location /adguard/ {
|
||||||
@@ -123,7 +123,7 @@ http {
|
|||||||
|
|
||||||
# location / {
|
# location / {
|
||||||
# root /app;
|
# root /app;
|
||||||
# index login.html;
|
# index override.html login.html;
|
||||||
# try_files $uri $uri/ =404;
|
# try_files $uri $uri/ =404;
|
||||||
# }
|
# }
|
||||||
# location /adguard/ {
|
# location /adguard/ {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ http {
|
|||||||
|
|
||||||
location / {
|
location / {
|
||||||
root /app;
|
root /app;
|
||||||
index login.html;
|
index override.html login.html;
|
||||||
try_files $uri $uri/ =404;
|
try_files $uri $uri/ =404;
|
||||||
}
|
}
|
||||||
location /adguard/ {
|
location /adguard/ {
|
||||||
@@ -123,7 +123,7 @@ http {
|
|||||||
|
|
||||||
# location / {
|
# location / {
|
||||||
# root /app;
|
# root /app;
|
||||||
# index login.html;
|
# index override.html login.html;
|
||||||
# try_files $uri $uri/ =404;
|
# try_files $uri $uri/ =404;
|
||||||
# }
|
# }
|
||||||
# location /adguard/ {
|
# location /adguard/ {
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
09.10.2024 v1.65
|
||||||
|
- фикс создания архива windows service singbox
|
||||||
|
06.10.2024 v1.64.1
|
||||||
|
- добавление html заглушки через меню
|
||||||
|
06.10.2024 v1.64
|
||||||
|
- возможность установить свою html-заглушку
|
||||||
06.10.2024 v1.63
|
06.10.2024 v1.63
|
||||||
- приоритет правила block над остальными в стандартном шаблоне sing-box
|
- приоритет правила block над остальными в стандартном шаблоне sing-box
|
||||||
30.09.2024 v1.62
|
30.09.2024 v1.62
|
||||||
|
|||||||
Reference in New Issue
Block a user