Skip to content

Commit

Permalink
Add zlib-devel and remove sudo -- README.md (TelegramMessenger#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
savely-krasovsky authored and stek29 committed Jun 8, 2018
1 parent dbe89fc commit d2ceadc
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
# MTProxy

# 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'd need normal set of tools for building from
source, and a dev package for openssl.

On Ubuntu/Debian:
On Debian/Ubuntu:
```bash
apt install build-essential libssl-dev
apt install build-essential libssl-dev zlib1g-dev
```

On CentOS:
On CentOS/RHEL:
```bash
yum install openssl-devel
yum install openssl-devel zlib-devel
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.

# Running
## Running
1. Obtain a secret, used to connect to telegram servers.
```bash
curl -s https://core.telegram.org/getProxySecret -o proxy-secret
Expand Down Expand Up @@ -52,7 +48,7 @@ head -c 16 /dev/urandom | xxd -ps
## Systemd example configuration
1. Create systemd service file (it's standart path for the most Linux distros, but you should check it before):
```bash
sudo nano /etc/systemd/system/MTProxy.service
nano /etc/systemd/system/MTProxy.service
```
2. Edit this basic service (especially paths and params):
```bash
Expand All @@ -71,17 +67,17 @@ WantedBy=multi-user.target
```
3. Reload daemons:
```bash
sudo systemctl daemon-reload
systemctl daemon-reload
```
4. Test fresh MTProxy service:
```bash
sudo systemctl restart MTProxy.service
systemctl restart MTProxy.service
# Check status, it should be active
sudo systemctl status MTProxy.service
systemctl status MTProxy.service
```
5. Enable it, to autostart service after reboot:
```bash
sudo systemctl enable MTProxy.service
systemctl enable MTProxy.service
```

## Docker image
Expand Down

0 comments on commit d2ceadc

Please sign in to comment.