From c2cd945991bfced3948bd39c0a51ff12e9f08482 Mon Sep 17 00:00:00 2001 From: mercury Date: Thu, 6 Feb 2025 16:09:21 +0400 Subject: [PATCH] hashbot migration with backup --- app/bot.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/bot.php b/app/bot.php index 9b212b3..6e36cd8 100644 --- a/app/bot.php +++ b/app/bot.php @@ -6721,7 +6721,13 @@ DNS-over-HTTPS with IP: public function getHashBot() { - return substr(hash('sha256', $this->key), 0, 8); + $p = $this->getPacConf(); + if (!empty($p['hashbot'])) { + return $p['hashbot']; + } + $p['hashbot'] = substr(hash('sha256', $this->key), 0, 8); + $this->setPacConf($p); + return $p['hashbot']; } public function cloakNginx()