This uses the native built-in proxy feature in the Telegram app.
The problem is the README in the official 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.
- Launch a clean Ubuntu 22.04 instance. I'm using AWS Lightsail.
ssh
into the machine: