CentOS搭建tg的MTProxy代理

MTProxy搭建

  • 1,~~MTProxy搭建~~(已被识别)
  • 2,创建服务MTProxy.service

1,MTProxy搭建(已被识别)

  • 搭建MTProxy
# cat /etc/redhat-release 
CentOS Linux release 7.6.1810 (Core)

# yum install openssl-devel zlib-devel
# yum groupinstall "Development Tools"
# git clone https://github.com/TelegramMessenger/MTProxy
# cd MTProxy/
# 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
970...
# chmod +x proxy-multi.conf 
# chmod +x proxy-secret
# ./mtproto-proxy -u nobody -p 44... -H 55... -S 970...  --aes-pwd proxy-secret proxy-multi.conf -M 1 --nat-info 10...:35...

head -c 16 /dev/urandom | xxd -ps 生成密钥
./mtproto-proxy -u nobody -p 本地端口 -H 代理端口 -S 密钥 --aes-pwd proxy-secret proxy-multi.conf -M 1 --nat-info 内网IP:外网IP

  • 桌面客户端配置代理
    CentOS搭建tg的MTProxy代理_第1张图片
  • 已连接,成功连接不挂VPN可以成功接受发送消息。
    CentOS搭建tg的MTProxy代理_第2张图片

2,创建服务MTProxy.service

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

[Service]
Type=simple
WorkingDirectory=/root/MTProxy/objs/bin
ExecStart=/root/MTProxy/objs/bin/mtproto-proxy -u nobody -p 44... -H 55... -S 970...  --aes-pwd proxy-secret proxy-multi.conf -M 1 --nat-info 10...:35...
Restart=on-failture

[Install]
WantedBy=multi-user.target

# systemctl daemon-reload
# systemctl restart MTProxy.service
# systemctl status  MTProxy.service
# systemctl enable MTProxy.service

参考:

  1. MTProxy
  2. 搭建tg的MTProxy代理

你可能感兴趣的:(Mac,OS,MTProxy代理)