How to build telegram proxy

@jling  June 13, 2021

This article introduces the following three methods to use the refactored mtproxy proxy of 9seconds/mtg, which also has the following characteristics:

  1. Generate Fake tls form proxy

1. Switch to the root directory

cd /root

2. Directly download the compiled mtg binary file

wget https://github.com/9seconds/mtg/releases/download/v2.0.1/mtg-2.0.1-linux-amd64.tar.gz //This is the package compiled by the author of 9seconds
mv mtg-linux-amd64 mtg //Rename the binary package for later use

两者的命令主要是参数的不同,解压tar.gz和tar.bz2不同压缩文件的命令如下:

  • 解压tar.gz文件

tar -zxvf ×××.tar.gz

  • 解压tar.bz2文件

tar -jxvf ×××.tar.bz2
  -z :是否同时具有 gzip 的属性?亦即是否需要用 gzip 压缩?
  -j :是否同时具有 bzip2 的属性?亦即是否需要用 bzip2 压缩?

Description: The releases address of the package compiled by the author: https://github.com/9seconds/mtg/releases

3. Give root user executable permissions to the binary file

chmod +x /root/mtg

4. Use the binary file to generate a key to counter-generate an https website

/root/mtg generate-secret -c baidu.com tls
ee1e5273b2938f82c3c0eb62b776b0832662616964752e636f6d //Assuming this is the generated key

5. Let the mtg program run in the background with a key monitoring port

nohup /root/mtg run -b 0.0.0.0:12345 ee1e5273b2938f82c3c0eb62b776b0832662616964752e636f6d &
Explanation: -b is followed by the listening address and port, and that large string of characters is the key. cat nohup.out can view the program running output log, which contains the tg proxy link. For more variable usage, please visit the author’s project address: https://github.com/9seconds/mtg

Second, generate a 32-bit key agent

The first three steps are the same as above

4. Let the mtg program run in the background with a key monitoring port

nohup /root/mtg run -b 0.0.0.0:443 dd28d1eea5fcc3a833f773155f4589a4e3 &

Note: 443 in the above code is the port number, dd28d1eea5fcc3a833f773155f4589a4e3 is the proxy key (change this key yourself, don’t use this, don’t change the front dd). Someone must say that I am not good at math. It is obviously 34 digits, but it is not.

Adding dd in the front is mandatory security verification. Clients without dd cannot connect. This can better disguise traffic and prevent it from being identified


添加新评论