The folder aws-infra-minimal contains the minimum amount of infra required to launch just one proxy server. The other folder aws-infra has laid the foundation to scale the proxy infra up to support a lot of users. It has a NLB, auto scaling group, with public private instances.
One click deploy minimal IaC to run a Telegram proxy server in AWS.
- Clone this repo
- cd into aws-infra/
cp sample.env .env- Edit
.envto have actual AWS secrets values set -asource .envterraform plan -out plan.tfplanterraform apply plan.tfplan- Open the public IP of the EC2 in a browser for proxy server connection details.
- Open the public IP of the EC2 in a browser. (This is made possible using the containerized FastAPI application in tproxy-server-expose-details/)
- Use the connection details shown there (IP, port, secret) in telegram client to connect to the proxy server
- Bypass censorship and use Telegram
The EC2 instance is deployed in Thailand (ap-southeast-7). Change the region in aws-infra/main.tf if you want it deployed somewhere else. Also feel free 2 set the AZ in aws-infra/subnet.tf if you want.
NOTE: Earlier Thailand worked but now it is not working. So I changed it to Singapore
ap-southeast-1inaws-infra
Steps to deploy are the same. For connecting to the server from the client, enter NLB dns name instead of public IPV4 address. And there is no app running on :80 to expose the details for connection. See terraform outputs instead.
This project has been paused because I am working on somehting else right now.
In the future I will add
- Fine tuned auto scaling
- Lamdba based cost monitoring API
- Lambda based management API for
- Manual overriding of Auto Scaling values
- Retrieve and update proxy server secret
- QR Code generation based on proxy connection details (frontend work)
- Shut down / reboot bastion
- Proxy Server connectivity check and notification
For now, it "just works" and deploys a NLB with 1 auto scaled server.