yum groupinstall "Development Tools"
yum install openssl-devel zlib-devel libtool perl-core git

cd /opt
wget https://www.openssl.org/source/openssl-1.1.1-pre8.tar.gz

tar -xzvf openssl-1.1.1-pre8.tar.gz
./config
make
make install
ln -s /usr/local/lib64/libssl.so.1.1 /usr/lib64/
ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/
mv /usr/bin/openssl /usr/bin/openssl_old
ln -s /usr/local/bin/openssl /usr/bin/
git clone https://github.com/TelegramMessenger/MTProxy

правим Makefile:
CFLAGS = -I/usr/local/include/openssl
LDFLAGS = -L /usr/local/lib64

make clean; make && cd objs/bin

curl -s https://core.telegram.org/getProxySecret -o proxy-secret
curl -s https://core.telegram.org/getProxyConfig -o proxy-multi.conf
head -c 16 /dev/urandom | xxd -ps



# cat /etc/systemd/system/MTProxy.service
[Unit]
Description=MTProxy
After=network.target

[Service]
Type=simple
WorkingDirectory=/opt/MTProxy/objs/bin
ExecStart=/opt/MTProxy/objs/bin/mtproto-proxy -u nobody -p 8888 -H 8443 -S <SECRET_KEY> --aes-pwd proxy-secret proxy-multi.conf -M 1
Restart=on-failure

[Install]
WantedBy=multi-user.target


systemctl enable MTProxy.service

systemctl start MTProxy.service




Comments powered by CComment