Skip to content

Oct4Pie/MtProto-ngrok

Repository files navigation

MtProto-ngrok

Expose Your MtProto Proxy to the Internet

You can use this project to expose your Telegram MtProto proxy and don't worry about portability and port forwarding. This project is using mtprotoproxy, written in Python.

Getting Started

The code has been tested on Windows 10, macOS, and most Linux operating systems with Python 3.5-3.9.

  • To get a copy via git:
git clone https://github.com/Oct4Pie/MtProto-ngrok.git

Prerequisites

The proxy may run smoother and faster when the cryptography module is installed.

  • It can be installed from pypi via PIP:
pip3 install cryptography
  • main.py downloads and runs ngrok
  • Ngrok requires an authentication token to route TCP traffic. You can sign up at here and then obtain your token from here.
  • Set AUTHTOKEN in config.py equal to your token.

Running

  • To run the proxy server and ngrok tunnel use:
cd MtProto-ngrok
python3 main.py
  • The output url can be pasted in your Telegram app

Example

$ python3 main.py
TLS: 
in-app: tg://proxy?server=6.tcp.ngrok.io&port=19977&secret=eed22691fe775a6bfefd0bd56c63afd8257777772e6e67726f6b2e636f6d
external: https://t.me/proxy?server=6.tcp.ngrok.io&port=19977&secret=eed22691fe775a6bfefd0bd56c63afd8257777772e6e67726f6b2e636f6d 

Secure: 
in-app: tg://proxy?server=6.tcp.ngrok.io&port=19977&secret=ddd22691fe775a6bfefd0bd56c63afd825
external: https://t.me/proxy?server=6.tcp.ngrok.io&port=19977&secret=ddd22691fe775a6bfefd0bd56c63afd825 

host:port -> 6.tcp.ngrok.io:19977
secret -> d22691fe775a6bfefd0bd56c63afd825

Running on Repl.it

  • Choose Python as the language
  • Set run="python3 main.py"
  • Run the replit via "Run" or using shell: python3 main.py

Advertising Channles

  • Refer to the @MTProxybot Telegram bot to obtain a tag
  • Set AD_TAG in config.py equal to your tag

Telegram Support Group

License

This project is licensed under the MIT License See LICENSE file for more details

Acknowledgments

About

Easily Expose Telegram MtProto Proxies to the Internet Via Ngrok's TCP Tunneling

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages