Update README

This commit is contained in:
9seconds
2019-11-11 17:38:26 +03:00
parent 24137b6ea2
commit 1258f07197
+31 -28
View File
@@ -17,33 +17,33 @@ are the most notable:
* [Python](https://github.com/alexbers/mtprotoproxy) * [Python](https://github.com/alexbers/mtprotoproxy)
* [Erlang](https://github.com/seriyps/mtproto_proxy) * [Erlang](https://github.com/seriyps/mtproto_proxy)
Almost all of them follow the way how official proxy was build. This Almost all of them follow the way how official proxy was built. This
includes support of multiple secrets, support of promoted channels etc. includes support of multiple secrets, support of promoted channels, etc.
mtg is an implementation in golang which is intended to be: mtg is an implementation in golang which is intended to be:
* **Lightweight** * **Lightweight**
It has to consume as less resources as possible but not by losing It has to consume as few resources as possible but not by losing
maintainability. maintainability.
* **Easily deployable** * **Easily deployable**
I strongly believe that Telegram proxies should follow the way of I strongly believe that Telegram proxies should follow the way of
ShadowSocks: promoted channels is a strange way of doing business ShadowSocks: promoted channels is a strange way of doing business
I suppose. I think the only viable way is to have a proxy with I suppose. I think the only viable way is to have a proxy with
minimum configuration which should work everywhere. minimum configuration which should work everywhere.
* **Single secret** * **A single secret**
I think that multiple secrets solves no problems and just complexify I think that multiple secrets solve no problems and just complexify
software. I also believe that in case of throwout proxies, this feature software. I also believe that in the case of throwout proxies, this
is useless luxury. feature is a useless luxury.
* **Minimum docker image size** * **Minimum docker image size**
Official image is less than 3 megabytes. Literally. Official image is less than 3 megabytes. Literally.
* **No management WebUI** * **No management WebUI**
This is an implementation of simple lightweight proxy. I won't do that. 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 This proxy supports 2 modes of work: direct connection to Telegram and
promoted channel mode. If you do not need promoted channels, I would promoted channel mode. If you do not need promoted channels, I would
recommend you to go with direct mode: this way is more robust. recommend you to go with direct mode: this way is more robust.
To run proxy in direct mode, all you need to do is just provide a 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 secret. If you do not provide ADTag as a second parameter, promoted
channels mode won't be activated. channels mode won't be activated.
@@ -104,7 +104,7 @@ Also, there is another project on Ansible Galaxy: https://galaxy.ansible.com/iva
# Configuration # Configuration
Basically, to run this tool you need to configure as less as possible. Telegram To run this tool you need to configure as less as possible. Telegram
clients support 3 different secret types: clients support 3 different secret types:
* Simple - basically, it is just a flow of frames ciphered by AES-CTR stream * Simple - basically, it is just a flow of frames ciphered by AES-CTR stream
@@ -146,22 +146,22 @@ ee852380f362a09343efb4690c4e17862e676f6f676c652e636f6d
## Antireplay cache ## Antireplay cache
In order to prevent replay attacks, we have internal storage of first To prevent replay attacks, we have internal storage of first frames
frames messages for connected clients. These frames are generated messages for connected clients. These frames are generated randomly
randomly by design and we have negligible possibility of duplication by design and we have the negligible possibility of duplication
(probability is 1/(2^64)) but it could be quite effective in order to (probability is 1/(2^64)) but it could be quite effective to prevent
prevent replays. replays.
## FakeTLS ## FakeTLS
If you run this a proxy in faketls mode, this proxy will try to hide If you run this a proxy in faketls mode, this proxy will try to hide
itself cloaking a host provided as a part of generated secret. It means itself cloaking a host provided as a part of the generated secret. It
that if you cloak google.com then you can curl this proxy and you'll get means that if you cloak google.com then you can curl this proxy and
a google.com response back. you'll get a google.com response back.
mtg proxifies L3 traffic. In other words, only TCP, without interfering mtg proxies L3 traffic. In other words, only TCP, without interfering in
in TLS, HTTP or any other high-level protocol. TLS, HTTP or any other high-level protocol.
## Environment variables ## Environment variables
@@ -258,11 +258,14 @@ the box, you do not need to setup anything special.
Version 1.0 breaks compatibility with previous versions so please read Version 1.0 breaks compatibility with previous versions so please read
this chapter carefully: this chapter carefully:
1. mtg now uses subcommands. Please use `mtg run` instead of just `mtg` to run 1. mtg now uses subcommands. Please use `mtg run` instead of just
a proxy. `mtg` to run a proxy.
2. Options which set host and port separately were removed in a favor of fused 2. Options which set host and port separately were removed in a
host:port options. favor of fused `host:port` options.
3. Own stats server was removed. Prometheus endpoint is moved to default stats 3. Own stats server was removed. Prometheus endpoint is moved to
endpoint. default stats endpoint.
4. It is possible to connect to this proxy only with a secret which was used to 4. It is possible to connect to this proxy only with a secret which
run it. So, no backward compatibility of clients. was used to run it. So, no backward compatibility of clients.
5. Multiplexing involves connectivity with middle proxies and involves
the most complex code path of this proxy. To avoid potential bugs,
we still recommend using direct mode.