You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The README in the official [TelegramMessenger/MTProxy](https://github.com/TelegramMessenger/MTProxy) repo is outdated and fails at multiple points if you try following the steps described. Here's an updated version as of March 2024
# How to set up a Telegram Proxy
This uses the native built-in proxy feature in the Telegram app.
The problem is the README in the official [TelegramMessenger/MTProxy](https://github.com/TelegramMessenger/MTProxy) repo is outdated and fails at multiple points if you try following the steps described. Here's an updated version as of March 2024.
## Instructions
1. Launch a clean Ubuntu 22.04 instance. I'm using AWS Lightsail. `ssh` into the machine:
```
rameerez
revised
this gist Mar 23, 2024.
1 changed file
with
1 addition
and
1 deletion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The README in the [official TelegramMessenger/MTProxy repo](https://github.com/TelegramMessenger/MTProxy) is outdated and fails at multiple points if you try following the steps described. Here's an updated version as of March 2024
The README in the official [TelegramMessenger/MTProxy](https://github.com/TelegramMessenger/MTProxy) repo is outdated and fails at multiple points if you try following the steps described. Here's an updated version as of March 2024
1. Launch a clean Ubuntu 22.04 instance. I'm using AWS Lightsail. `ssh` into the machine:
```
rameerez
revised
this gist Mar 23, 2024.
1 changed file
with
1 addition
and
1 deletion.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The README in the [official TelegramMessenger/MTProxy repo](https://github.com/TelegramMessenger/MTProxy) is outdated and fails at multiple points if you try following the steps described. Here's an updated version as of March 2024
1. Launch a clean Ubuntu 22.04 instance. I'm using AWS Lightsail. `ssh` into the machine:
13. Update the ownership of the MTProxy directory to the new user
```
sudo chown -R mtproxy:mtproxy /opt/MTProxy
```
14. Allow traffic on port 8443 by opening the ports in the AWS Lightsail instance:
- Navigate to your AWS Lightsail instance
- In the Networking tab, under "IPv4 Firewall", click "Add rule"
- Add a rule for a "Custom" TCP protocol on 8443. Make sure "Duplicate rule for IPv6" is active
- Click "create"
15. Now we need to know our AWS instance's private and public IP to pass them to MTProxy.
All AWS instances are behind a NAT, and this causes the RPC protocol handshake to fail if a private-to-public network address translation is not passed explicitly to MTProxy as the `--nat-info` param. If you don't do this, the proxy will look like it's running normally, but Telegram clients will not be able to connect, and the app will show a message like "Proxy unavailable" or an infinite "Conecting..." message.
If you don't know how to look up your AWS instance's public and private IPs, follow [these steps](https://github.com/TelegramMessenger/MTProxy/issues/194#issuecomment-787639858)
Once you have your private and public IP, which should look something like `170.10.0.200` and `18.180.0.1`, keep them at hand because you'll need them in a moment and continue.