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 # 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 On Debian/Ubuntu:
source, and a dev package for openssl.
On Ubuntu/Debian:
```bash ```bash
apt install build-essential libssl-dev apt install build-essential libssl-dev zlib1g-dev
``` ```
On CentOS/RHEL:
On CentOS:
```bash ```bash
yum install openssl-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. 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. 1. Obtain a secret, used to connect to telegram servers.
```bash ```bash
curl -s https://core.telegram.org/getProxySecret -o proxy-secret curl -s https://core.telegram.org/getProxySecret -o proxy-secret
...@@ -52,7 +48,7 @@ head -c 16 /dev/urandom | xxd -ps ...@@ -52,7 +48,7 @@ head -c 16 /dev/urandom | xxd -ps
## Systemd example configuration ## Systemd example configuration
1. Create systemd service file (it's standart path for the most Linux distros, but you should check it before): 1. Create systemd service file (it's standart path for the most Linux distros, but you should check it before):
```bash ```bash
sudo nano /etc/systemd/system/MTProxy.service nano /etc/systemd/system/MTProxy.service
``` ```
2. Edit this basic service (especially paths and params): 2. Edit this basic service (especially paths and params):
```bash ```bash
...@@ -71,17 +67,17 @@ WantedBy=multi-user.target ...@@ -71,17 +67,17 @@ WantedBy=multi-user.target
``` ```
3. Reload daemons: 3. Reload daemons:
```bash ```bash
sudo systemctl daemon-reload systemctl daemon-reload
``` ```
4. Test fresh MTProxy service: 4. Test fresh MTProxy service:
```bash ```bash
sudo systemctl restart MTProxy.service systemctl restart MTProxy.service
# Check status, it should be active # Check status, it should be active
sudo systemctl status MTProxy.service systemctl status MTProxy.service
``` ```
5. Enable it, to autostart service after reboot: 5. Enable it, to autostart service after reboot:
```bash ```bash
sudo systemctl enable MTProxy.service systemctl enable MTProxy.service
``` ```
## Docker image ## 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