diff --git a/app/bot.php b/app/bot.php index 0166486..121e9fe 100644 --- a/app/bot.php +++ b/app/bot.php @@ -802,6 +802,14 @@ class Bot ]; } + public function ssPswdCheck() + { + $c = $this->getSSConfig(); + if (empty($c['password']) || ($c['password'] == 'test')) { + $this->sspwdch(password_hash(time(), PASSWORD_DEFAULT), 1); + } + } + public function changeCamouflage() { $r = $this->send( @@ -1024,7 +1032,7 @@ class Bot $this->menu('oc'); } - public function sspwdch($pass) + public function sspwdch($pass, $nomenu = false) { $this->ssh('pkill sslocal', 'proxy'); $this->ssh('pkill ssserver', 'ss'); @@ -1035,7 +1043,11 @@ class Bot file_put_contents('/config/sslocal.json', json_encode($l, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)); $this->ssh('ssserver -v -d -c /config.json', 'ss'); $this->ssh('sslocal -v -d -c /config.json', 'proxy'); - $this->menu('ss'); + + $this->sd($c, 1); + if (!empty($nomenu)) { + $this->menu('ss'); + } } public function v2ray() diff --git a/app/service.php b/app/service.php index 63e9cc1..58e00a4 100644 --- a/app/service.php +++ b/app/service.php @@ -13,6 +13,7 @@ if ($c['debug']) { $bot = new Bot($c['key'], $i); $bot->selfUpdate(); +$bot->ssPswdCheck(); $bot->restartTG(); if (!empty($bot->selfupdate)) { $bot->offWarp(); diff --git a/version b/version index 3404799..2bbb289 100644 --- a/version +++ b/version @@ -1,4 +1,6 @@ -14.12.2024 v1.114 +19.12.2024 v1.115 +- генерация устойчивого пароля shadowsocks, если он равен test или пуст +19.12.2024 v1.114 - убран дефолтный пароль у shadowsocks 13.12.2024 v1.113 - обновлен adguardHome