MTProto improve

This commit is contained in:
mercury
2023-06-06 18:05:32 +04:00
parent bf91511da6
commit b103bed5ce
3 changed files with 7 additions and 4 deletions
+4 -3
View File
@@ -4,9 +4,10 @@ echo 'PubkeyAcceptedKeyTypes +ssh-rsa' >> /etc/ssh/sshd_config
service ssh start
curl -s https://core.telegram.org/getProxySecret -o proxy-secret
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
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
head -c 16 /dev/urandom | xxd -ps > /mtprotosecret
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