From 03218b974d4109bbc929fdc23029d0a634d9a6d2 Mon Sep 17 00:00:00 2001 From: mercury Date: Sat, 8 Nov 2025 19:20:50 +0400 Subject: [PATCH] download vless button --- app/bot.php | 26 ++++++++++++++++++++++++++ docker-compose.yml | 4 ++-- version | 5 +++++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/app/bot.php b/app/bot.php index 1af7e52..2e4ede2 100644 --- a/app/bot.php +++ b/app/bot.php @@ -447,6 +447,9 @@ class Bot case preg_match('~^/download (\d+)$~', $this->input['callback'], $m): $this->downloadPeer($m[1]); break; + case preg_match('~^/dw (\w+) (\w+)$~', $this->input['callback'], $m): + $this->dw($m[1], $m[2]); + break; case preg_match('~^/deloc (\d+)$~', $this->input['callback'], $m): $this->deloc($m[1]); break; @@ -1864,6 +1867,15 @@ class Bot } } + public function dw($u, $t) + { + $c = $this->getXray()['inbounds'][0]['settings']['clients'][$u]; + $_GET['s'] = $c['id']; + $_GET['t'] = $t; + $conf = $this->subscription(1); + $this->sendFile($this->input['from'], new CURLStringFile($conf, $c['email'] . ($t == 'cl' ? '_mihomo.yaml' :($t == 'si' ? '_singbox.json' : '_v2ray.json')))); + } + public function downloadPeer($client) { $cl = $client; @@ -6479,6 +6491,20 @@ DNS-over-HTTPS with IP: 'web_app' => ['url' => "https://{$domain}/pac$hash?t=cl&s={$c['id']}"], ], ]; + $data[] = [ + [ + 'text' => $this->i18n('v2ray ⬇️'), + 'callback_data' => "/dw {$i} s", + ], + [ + 'text' => $this->i18n('singbox ⬇️'), + 'callback_data' => "/dw {$i} si", + ], + [ + 'text' => $this->i18n('mihomo ⬇️'), + 'callback_data' => "/dw {$i} cl", + ], + ]; $data[] = [ [ 'text' => $c['time'] ? "timer: " . $this->getTime($c['time']) : $this->i18n('timer'), diff --git a/docker-compose.yml b/docker-compose.yml index 6bfd1fd..51bdc58 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -283,7 +283,7 @@ services: ipv4_address: 10.10.0.14 logging: *default-logging ad: - image: mercurykd/vpnbot-ad:1.3 + image: mercurykd/vpnbot-ad:1.4 build: dockerfile: dockerfile/adguard.dockerfile args: @@ -346,7 +346,7 @@ services: ipv4_address: 10.10.0.8 logging: *default-logging xr: - image: mercurykd/vpnbot-xr:1.4 + image: mercurykd/vpnbot-xr:1.5 build: dockerfile: dockerfile/xray.dockerfile args: diff --git a/version b/version index 85fbb8b..7174e04 100644 --- a/version +++ b/version @@ -1,3 +1,8 @@ +08.11.2025 v2.26 +- обновлено ядро xray +- обновлен adguardHome +- добавлен iodine(dnstt) +- добавлены кнопки скачивания vless-конфига 19.07.2025 v2.25 - перед запуском обязательно запустить:
touch ./override.env ./docker-compose.override.yml ./config/location.conf ./config/override.conf