Total Pageviews

Wednesday, 8 April 2020

Telegram的代理程序mtg

Bullshit-free MTPROTO proxy for Telegram。
Build Status Go Report Card Docker Build Status
Please see a guide on upgrading to 1.0 at the end of this README.

Rationale

There are several available proxies for Telegram MTPROTO available. Here are the most notable:
Almost all of them follow the way how official proxy was built. This includes support of multiple secrets, support of promoted channels, etc.
mtg is an implementation in golang which is intended to be:
  • Lightweight It has to consume as few resources as possible but not by losing maintainability.
  • Easily deployable I strongly believe that Telegram proxies should follow the way of ShadowSocks: promoted channels is a strange way of doing business I suppose. I think the only viable way is to have a proxy with minimum configuration which should work everywhere.
  • A single secret I think that multiple secrets solve no problems and just complexify software. I also believe that in the case of throwout proxies, this feature is a useless luxury.
  • Minimum docker image size Official image is less than 3.5 megabytes. Literally.
  • No management WebUI This is an implementation of a simple lightweight proxy. I won't do that.
This proxy supports 2 modes of work: direct connection to Telegram and promoted channel mode. If you do not need promoted channels, I would recommend you to go with direct mode: this way is more robust.
To run a proxy in direct mode, all you need to do is just provide a secret. If you do not provide ADTag as a second parameter, promoted channels mode won't be activated.
To get promoted channel, please contact @MTProxybot and provide generated adtag as a second parameter.

Source code organization

There are 2 main branches:
  1. master branch contains potentially unstable features
  2. stable branch contains stable version. Usually you want to use this branch.

How to build

make
If you want to build for another platform:
make crosscompile
frm https://github.com/9seconds/mtg