2026年仍稳定可用的高隐蔽 MTProxy 完整部署脚本(带TLS伪装+FakeTLS+自动生成链接)
一、手工部署高隐蔽版(推荐)
① 安装环境
apt update && apt install -y git curl build-essential libssl-dev zlib1g-dev openssl
② 下载官方 MTProxy
cd /opt
git clone https://github.com/TelegramMessenger/MTProxy.git
cd MTProxy
make
③ 下载 Telegram 官方握手配置
curl -s https://core.telegram.org/getProxySecret -o proxy-secret
curl -s https://core.telegram.org/getProxyConfig -o proxy-multi.conf
④ 生成 FakeTLS 域名伪装 Secret(这是关键)
先选一个全球正常 HTTPS 域名作为伪装:
推荐:
- cloudflare.com
- microsoft.com
- aws.amazon.com
- cdn.cloudflare.net
这里我以:
cloudflare.com
为例。
生成32位随机hex
apt install xxd -y
HEX=$(head -c 16 /dev/urandom | xxd -ps)
echo $HEX
假设输出:
6e5ad3c8f97ab221c0ffee1122334455
⑤ 创建 systemd 服务
vi /etc/systemd/system/mtproxy.service
写入:
[Unit]
Description=MTProxy FakeTLS Telegram Proxy
After=network.target
[Service]
Type=simple
WorkingDirectory=/opt/MTProxy
ExecStart=/opt/MTProxy/objs/bin/mtproto-proxy -u nobody -p 8888 -H 443 -S 6e5ad3c8f97ab221c0ffee1122334455 -D cloudflare.com --aes-pwd proxy-secret proxy-multi.conf -M 1 --http-stats
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
二、开放端口
ufw allow 443/tcp
ufw allow 8888/tcp
ufw reload
并且云安全组放行:
- TCP 443
- TCP 8888
三、启动服务
systemctl daemon-reload
systemctl enable mtproxy
systemctl restart mtproxy
systemctl status mtproxy
四、检查是否启动成功
看日志:
journalctl -u mtproxy -f
正常会出现:
listening on [::]:443
五、自动生成 Telegram 分享链接
假设服务器IP是:
1.2.3.4
那么链接:
https://t.me/proxy?server=1.2.3.4&port=443&secret=6e5ad3c8f97ab221c0ffee1122334455