From a1ac552c3e6a3bc16043c5c71977968f78dda4f5 Mon Sep 17 00:00:00 2001 From: mercury Date: Sat, 4 May 2024 12:09:52 +0400 Subject: [PATCH] fix start singbox --- app/bot.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/bot.php b/app/bot.php index 722e335..66b8d33 100644 --- a/app/bot.php +++ b/app/bot.php @@ -3872,11 +3872,10 @@ DNS-over-HTTPS with IP: public function xray($page = 0) { - if (!$this->ssh('pgrep sing-box', 'si')) { + $pac = $this->getPacConf(); + if (!$this->ssh('pgrep sing-box', 'si') || empty($pac['xray']['private'])) { $this->generateSecretXray(); } - $c = $this->getXray(); - $pac = $this->getPacConf(); $text[] = "Menu -> " . $this->i18n('xray'); $text[] = "\nfake domain: {$pac['xray']['domain']}"; $text[] = "public: {$pac['xray']['public']}";