MTProto
This commit is contained in:
@@ -7,6 +7,7 @@ apt install -y \
|
||||
make \
|
||||
git \
|
||||
iptables \
|
||||
iproute2 \
|
||||
xtables-addons-common \
|
||||
xtables-addons-dkms
|
||||
mkdir -p /etc/apt/keyrings
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
cat /ssh/key.pub > /root/.ssh/authorized_keys
|
||||
echo 'HostKeyAlgorithms +ssh-rsa' >> /etc/ssh/sshd_config
|
||||
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 ]
|
||||
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
|
||||
fi
|
||||
tail -f /dev/null
|
||||
@@ -1,4 +1,3 @@
|
||||
export IP=$(curl https://ipinfo.io/ip)
|
||||
rm /ssh/key*
|
||||
ssh-keygen -m PEM -t rsa -f /ssh/key -N ''
|
||||
openssl req -newkey rsa:2048 -sha256 -nodes -x509 -days 365 -keyout /certs/self_private -out /certs/self_public -subj "/C=NN/ST=N/L=N/O=N/CN=$IP"
|
||||
|
||||
Reference in New Issue
Block a user