MtProto-ngrok
MtProto-ngrok copied to clipboard
Easily Expose Telegram MtProto Proxies to the Internet Via Ngrok's TCP Tunneling
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
inconfig.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
- You can clone the repository via repl.it
- Sign up at https://repl.it/signup
- In the homepage, under "Create," click "+"
- Enter the repository's address: https://github.com/Oct4Pie/MtProto-ngrok.git


- 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
inconfig.py
equal to your tag
Telegram Support Group
- Join us at https://t.me/MtProto_ngrok
License
This project is licensed under the MIT License See LICENSE file for more details