Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 90084c37ff | |||
| b49f088256 |
+14
-2
@@ -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()
|
||||
|
||||
@@ -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
@@ -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,7 +1,7 @@
|
||||
{
|
||||
"server": "0.0.0.0",
|
||||
"server_port": 8388,
|
||||
"password": "test",
|
||||
"password": "",
|
||||
"timeout": 120,
|
||||
"method": "chacha20-ietf-poly1305",
|
||||
"no_delay": true,
|
||||
|
||||
Reference in New Issue
Block a user