From 95fea3bb7ba73207fef123e7338c9cd75bbeeb1f Mon Sep 17 00:00:00 2001 From: mercury Date: Sat, 13 Apr 2024 04:22:09 +0400 Subject: [PATCH] improve xtls user menu --- app/bot.php | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/app/bot.php b/app/bot.php index 604fd7a..4d61299 100644 --- a/app/bot.php +++ b/app/bot.php @@ -3784,9 +3784,21 @@ DNS-over-HTTPS with IP: $text[] = "Menu -> " . $this->i18n('xray') . " -> {$c['inbounds'][0]['settings']['clients'][$i]['email']}\n"; $text[] = "{$this->linkXray($i)}\n"; - $text[] = "v2ray: $v2ray\n"; - $text[] = "sing-box: $sing"; + $text[] = "v2ray import: v2rayng://install-config"; + $text[] = "v2ray config: $scheme://{$domain}/pac?h=$hash&t=s&s={$c['inbounds'][0]['settings']['clients'][$i]['id']}\n"; + $text[] = "sing-box import: sing-box://import-remote-profile"; + $text[] = "sing-box config: $scheme://{$domain}/pac?h=$hash&t=si&s={$c['inbounds'][0]['settings']['clients'][$i]['id']}"; + $data[] = [ + [ + 'text' => 'v2ray', + 'web_app' => ['url' => "https://{$domain}/pac?h=$hash&t=s&s={$c['inbounds'][0]['settings']['clients'][$i]['id']}"], + ], + [ + 'text' => 'sing-box', + 'web_app' => ['url' => "https://{$domain}/pac?h=$hash&t=si&s={$c['inbounds'][0]['settings']['clients'][$i]['id']}"], + ], + ]; $data[] = [ [ 'text' => $c['inbounds'][0]['settings']['clients'][$i]['time'] ? "timer: " . $this->getTime($c['inbounds'][0]['settings']['clients'][$i]['time']) : $this->i18n('timer'), @@ -3815,8 +3827,6 @@ DNS-over-HTTPS with IP: 'text' => $this->i18n('rename'), 'callback_data' => "/renameXrUser $i", ], - ]; - $data[] = [ [ 'text' => $this->i18n('delete'), 'callback_data' => "/delxr $i",