前言
Telegram
的几种内置代理,SOCKS5
就不用说了,明文传输一用就被封MTProxy
原来也还好,可惜现在被识别了,博主自己使用的情况,不管是官方版还是go语言版,基本没有坚持挺过24小时,就被阻断端口,虽然可以换端口,虽然有65535个端口可以更换,但还是非常麻烦。
介绍
MTG
是基于 MTProxy
的一个分支,基于代理的重放攻击的预防,在理论上是不会被干掉的MTG
代理遵循 ShadowSocks
的方式,并且 MTG
非常的轻量,无论安装还是卸载都非常简单。
一键安装
bash <(wget -qO- https://git.io/mtg.sh)
安装过程
root@ubuntu:~# systemctl stop mtg && systemctl disable mtg
Failed to stop mtg.service: Unit mtg.service not loaded.
root@ubuntu:~# rm -f /usr/local/bin/mtg /lib/systemd/system/mtg.service /etc/mtg.conf
root@ubuntu:~# bash <(wget -qO- https://git.io/mtg.sh)
Verifying archive integrity... 100% All good.
Uncompressing Bullshit-free MTPROTO proxy Bin package [build 2019-12-26] 100%
==================================================
>Random port generated, input another if wish to change, press Enter to continue
65535
# 这里输入你要设定的端口,记得后台放行端口
Input a domain for FakeTLS mode, "bing.com" will be used if left empty
# 这里输入TLS使用的域名,默认使用bing.com,建议直接回车使用默认域名
# 设置完这两项就OK,然后等待安装完成,在最后会给出你的TG代理连接
==================================================
> Using: PORT: 65535, FakeTLS DOMAIN : bing.com
==================================================
> Downloading mtg binary ...
2020-01-22 13:13:15 URL:https://github-production-release-asset-2e65be.s3.amazonaws.com/135544649/cca8c080-0af8-11ea-9a56-32a4f2f0d345?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200122%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200122T051312Z&X-Amz-Expires=300&X-Amz-Signature=17d481bc81f881400c01e5d27b6de83f2eda890ef89aff01b0f7861d9b418aff&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dmtg-linux-amd64&response-content-type=application%2Foctet-stream [10481664/10481664] -> "/usr/local/bin/mtg" [1]
FINISHED --2020-01-22 13:13:15--
Total wall clock time: 4.9s
Downloaded: 1 files, 10.0M in 1.9s (5.34 MB/s)
==================================================
v1.0.1 (go version go1.13.4 linux/amd64) [Tue, 19 Nov 2019 15:15:49 +0000]
Created symlink from /etc/systemd/system/multi-user.target.wants/mtg.service to /lib/systemd/system/mtg.service.
==================================================
>Installation Done. Waiting for service to load ...
> Generated Secret: eed8229777e783af51b95da521ca008fb662696e672e636f6d
> Mtg listening at port: 9024
> ...
> Setup mtproxy in telegram with following URL:
Jan 22 13:13:16 ubuntu mtg[5764]: "tme_url": "https://t.me/proxy?port=65535&secret=eed8229777e783af51b95da521ca008fb662696e672e636f6d&server=XX.XX.XX.XX",
Jan 22 13:13:16 ubuntu mtg[5764]: "tme_url": "https://t.me/proxy?port=65535&secret=eed8229777e783af51b95da521ca008fb662696e672e636f6d&server=%3Cnil%3E",
> Bye.
# 安装完成后会给出两条链接,其中第一条链接中有IP地址的就是你的MTG专用代理
卸载
# 卸载MTG
systemctl stop mtg && systemctl disable mtg
# 删除安装目录
rm -f /usr/local/bin/mtg /lib/systemd/system/mtg.service /etc/mtg.conf
本文作者:Kazuha Hub
本文链接:https://kazuhahub.com/archives/167/
版权声明:本Blog所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。非商业转载及引用请注明出处(作者、原文链接),商业转载请联系作者获得授权。
One comment
你的文章让我学到了很多技能,非常实用。 http://www.55baobei.com/bB7AaA1LjL.html