[ANN] MTProxy (for Telegram Messenger) Snap

I have packaged MTProxy as a Snap

MTProxy is a proxy protocol specifically for the Telegram Messenger. There are locations where Telegram is blocked, so this snap, along with a script that I created, helps easy setup of the proxy on a VPS (I tried DigitalOcean and it worked).

MTProxy, if run as root calls setuid() to drop privileges, which is not possible in a confined snap, so my script above creates a new user to workaround that.

A. Python Script from appstotalk

  1. Change directory to /opt/

cd /opt/

  1. Download the script

git clone https://github.com/alexbers/mtprotoproxy.git

  1. Change directory to mtprotoproxy

cd mtprotoproxy

  1. Install some python tools

sudo apt-get install python3 python3-crypto

  1. Edit config.py with your own port number and secret

sudo nano config.py

** search google for md5generator websites. You can generate your own secret.
** comment tg2 if you don’t need extra secret !

  1. To run the script when you closed ssh do this :

screen

  1. press enter to enter screen

  2. Run the mtproto by this command

sudo python3 mtprotoproxy.py

  1. To exit from screen without stopping script

press ctrl+a the press ctrl+d

  1. To reattach to screen type :

screen –ls ( show screen lists )

screen –r yourscreenid ( connect to your screen )