This commit is contained in:
mercury
2023-06-05 01:46:11 +04:00
parent d9f177fdb6
commit 4ddaa86daf
12 changed files with 285 additions and 3 deletions
+1
View File
@@ -7,6 +7,7 @@ apt install -y \
make \
git \
iptables \
iproute2 \
xtables-addons-common \
xtables-addons-dkms
mkdir -p /etc/apt/keyrings
+12
View File
@@ -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
View File
@@ -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"