Commit 69516f06 authored by Viktor Oreshkin's avatar Viktor Oreshkin

Readme improvements

parent d2ceadca
# MTProxy # MTProxy
Simple MT-Proto proxy
## Building ## Building
Install dependencies, you would need common set of tools for building from source, and development packages for `openssl` and `zlib`. Install dependencies, you would need common set of tools for building from source, and development packages for `openssl` and `zlib`.
...@@ -12,7 +13,20 @@ On CentOS/RHEL: ...@@ -12,7 +13,20 @@ On CentOS/RHEL:
yum install openssl-devel zlib-devel yum install openssl-devel zlib-devel
yum groupinstall "Development Tools" yum groupinstall "Development Tools"
``` ```
To build, simply run `make`. Your binary will be in `objs/bin/mtproto-proxy`. If build was failed, you would do `make clear` at first, before building it again.
Clone the repo:
```bash
git clone https://github.com/TelegramMessenger/MTProxy
cd MTProxy
```
To build, simply run `make`, the binary will be in `objs/bin/mtproto-proxy`:
```bash
make && cd objs/bin
```
If the build has failed, you should run `make clean` before building it again.
## Running ## Running
1. Obtain a secret, used to connect to telegram servers. 1. Obtain a secret, used to connect to telegram servers.
...@@ -38,11 +52,12 @@ head -c 16 /dev/urandom | xxd -ps ...@@ -38,11 +52,12 @@ head -c 16 /dev/urandom | xxd -ps
- `<secret>` is the secret generated at step 3. Also you can set multiple secrets: `-S <secret1> -S <secret2>`. - `<secret>` is the secret generated at step 3. Also you can set multiple secrets: `-S <secret1> -S <secret2>`.
- `proxy-secret` and `proxy-multi.conf` are obtained at steps 1 and 2. - `proxy-secret` and `proxy-multi.conf` are obtained at steps 1 and 2.
- `1` is the number of workers. You can increase the number of workers, if you have a powerful server. - `1` is the number of workers. You can increase the number of workers, if you have a powerful server.
- also feel free to check out other options using `mtproto-proxy --help`.
5. Generate the link with followed schema: `tg://proxy?server=SERVER_NAME&port=443&secret=SECRET` (by the way official bot provides links anyway). Also feel free to check out other options using `mtproto-proxy --help`.
5. Generate the link with following schema: `tg://proxy?server=SERVER_NAME&port=PORT&secret=SECRET` (or let the official bot generate it for you).
6. Register your proxy with [@MTProxybot](https://t.me/MTProxybot) on Telegram. 6. Register your proxy with [@MTProxybot](https://t.me/MTProxybot) on Telegram.
7. Set received tag as param `-P <proxy tag>` 7. Set received tag with arguments: `-P <proxy tag>`
8. Enjoy. 8. Enjoy.
## Systemd example configuration ## Systemd example configuration
...@@ -58,8 +73,8 @@ After=network.target ...@@ -58,8 +73,8 @@ After=network.target
[Service] [Service]
Type=simple Type=simple
WorkingDirectory=/opt/MTProxy/objs/bin WorkingDirectory=/opt/MTProxy
ExecStart=/opt/MTProxy/objs/bin/mtproto-proxy -u nobody -p 8888 -H 443 -S <secret> -P <tag> [other params] ExecStart=/opt/MTProxy/mtproto-proxy -u nobody -p 8888 -H 443 -S <secret> -P <proxy tag> <other params>
Restart=on-failure Restart=on-failure
[Install] [Install]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment