Commit d2ceadca authored by Savely Krasovsky's avatar Savely Krasovsky Committed by Viktor Oreshkin

Add zlib-devel and remove sudo -- README.md (#101)

parent dbe89fc6
# 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
......@@ -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
......@@ -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
......
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