MTProto improve
This commit is contained in:
+1
-1
@@ -292,7 +292,7 @@ class Bot
|
|||||||
|
|
||||||
public function generateSecret()
|
public function generateSecret()
|
||||||
{
|
{
|
||||||
$this->send($this->input['chat'], trim($this->ssh('head -c 16 /dev/urandom | xxd -ps', 'tg')));
|
$this->secretSet(trim($this->ssh('head -c 16 /dev/urandom | xxd -ps', 'tg')));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setSecret()
|
public function setSecret()
|
||||||
|
|||||||
+4
-3
@@ -4,9 +4,10 @@ echo 'PubkeyAcceptedKeyTypes +ssh-rsa' >> /etc/ssh/sshd_config
|
|||||||
service ssh start
|
service ssh start
|
||||||
curl -s https://core.telegram.org/getProxySecret -o proxy-secret
|
curl -s https://core.telegram.org/getProxySecret -o proxy-secret
|
||||||
curl -s https://core.telegram.org/getProxyConfig -o proxy-multi.conf
|
curl -s https://core.telegram.org/getProxyConfig -o proxy-multi.conf
|
||||||
if [ $(cat /mtprotosecret | wc -c) -gt 0 ]
|
if [ $(cat /mtprotosecret | wc -c) -eq 0 ]
|
||||||
then
|
then
|
||||||
SECRET=$(cat /mtprotosecret)
|
head -c 16 /dev/urandom | xxd -ps > /mtprotosecret
|
||||||
mtproto-proxy -u nobody -H $TGPORT --nat-info 10.10.0.8:$IP -S $SECRET --aes-pwd /proxy-secret /proxy-multi.conf -M 1
|
|
||||||
fi
|
fi
|
||||||
|
SECRET=$(cat /mtprotosecret)
|
||||||
|
mtproto-proxy -u nobody -H $TGPORT --nat-info 10.10.0.8:$IP -S $SECRET --aes-pwd /proxy-secret /proxy-multi.conf -M 1
|
||||||
tail -f /dev/null
|
tail -f /dev/null
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
06.06.2023 изменена логика запуска MTProto и кнопки генерации секрета
|
||||||
|
<code>git pull</code>
|
||||||
06.06.2023 фикс зависания wireguard после ребута
|
06.06.2023 фикс зависания wireguard после ребута
|
||||||
<code>git pull</code>
|
<code>git pull</code>
|
||||||
в файле <pre>config/wg0.conf</pre> удалите строчку с DNS, если она там есть
|
в файле <pre>config/wg0.conf</pre> удалите строчку с DNS, если она там есть
|
||||||
|
|||||||
Reference in New Issue
Block a user