|
|
7 yıl önce | |
|---|---|---|
| client | 7 yıl önce | |
| config | 7 yıl önce | |
| mtproto | 7 yıl önce | |
| obfuscated2 | 7 yıl önce | |
| proxy | 7 yıl önce | |
| scripts | 8 yıl önce | |
| stats | 7 yıl önce | |
| telegram | 7 yıl önce | |
| utils | 7 yıl önce | |
| wrappers | 7 yıl önce | |
| .gitignore | 7 yıl önce | |
| .gometalinter.json | 8 yıl önce | |
| .travis.yml | 8 yıl önce | |
| Dockerfile | 7 yıl önce | |
| Gopkg.lock | 7 yıl önce | |
| Gopkg.toml | 7 yıl önce | |
| LICENSE | 8 yıl önce | |
| Makefile | 7 yıl önce | |
| README.md | 7 yıl önce | |
| main.go | 7 yıl önce | |
| run-mtg.sh | 7 yıl önce |
Bullshit-free MTPROTO proxy for Telegram
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 build. This includes support of multiple secrets, support of promoted channels etc.
mtg is an implementation in golang which is intended to be:
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 is way more robust.
To run 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.
$ make
If you want to build for another platform:
$ make crosscompile
If you want to build Docker image (called mtg):
$ make docker
$ docker pull nineseconds/mtg
Basically, to run this tool you need to configure as less as possible.
First, you need to generate a secret:
$ openssl rand -hex 16
or
$ head -c 512 /dev/urandom | md5sum | cut -f 1 -d ' '
If you want to support new secure mode, please prepend dd to the
secret. For example, secret cf18fa8ea0267057e2c61a5f7322a8e7 should
be ddcf18fa8ea0267057e2c61a5f7322a8e7. But pay attention that some
old clients won’t support this mode. If this is not your case, I would
suggest to go with this mode.
Oneliners to generate such secrets:
$ echo dd$(openssl rand -hex 16)
or
$ echo dd$(head -c 512 /dev/urandom | md5sum | cut -f 1 -d ' ')
Now run the tool:
$ mtg <secret>
How to run the tool with ADTag:
$ mtg <secret> <adtag>
This tool will listen on port 3128 by default with the given secret.
$ docker run --name mtg --restart=unless-stopped -p 3128:3128 -p 3129:3129 -d nineseconds/mtg $(openssl rand -hex 16)
or in secret mode:
$ docker run --name mtg --restart=unless-stopped -p 3128:3128 -p 3129:3129 -d nineseconds/mtg dd$(openssl rand -hex 16)
You will have this tool up and running on port 3128. Now curl
localhost:3129 to get tg:// links or do docker logs mtg. Also,
port 3129 will show you some statistics if you are interested in.
Also, you can use run-mtg.sh script