Compare commits

..

2 Commits

Author SHA1 Message Date
mercury 90084c37ff shadowsocks password generation 2024-12-19 01:13:31 +04:00
mercury b49f088256 fix default password for shadowsocks 2024-12-19 00:15:41 +04:00
5 changed files with 21 additions and 4 deletions
+14 -2
View File
@@ -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()
+1
View File
@@ -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();
+1 -1
View File
@@ -3,7 +3,7 @@
"server_port": 8388,
"local_address": "0.0.0.0",
"local_port": 1080,
"password": "test",
"password": "",
"timeout": 120,
"method": "chacha20-ietf-poly1305",
"no_delay": true,
+1 -1
View File
@@ -1,7 +1,7 @@
{
"server": "0.0.0.0",
"server_port": 8388,
"password": "test",
"password": "",
"timeout": 120,
"method": "chacha20-ietf-poly1305",
"no_delay": true,
+4
View File
@@ -1,3 +1,7 @@
19.12.2024 v1.115
- генерация устойчивого пароля shadowsocks, если он равен test или пуст
19.12.2024 v1.114
- убран дефолтный пароль у shadowsocks
13.12.2024 v1.113
- обновлен adguardHome
- фикс краша adg при удалении dns-upstream из бота