All Projects → alexdoesh → mtproxy

alexdoesh / mtproxy

Licence: MIT license
Alpine-based Docker Image for Telegram MTProto Proxy

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to mtproxy

mtproxy autoinstaller
MTProxy autoinstaller for Ubuntu
Stars: ✭ 25 (-71.91%)
Mutual labels:  proxy-server, mtproto, mtproxy
mtproto-proxy-server
Web Server & MTProxy MTPROTO is proxy for Telegram
Stars: ✭ 26 (-70.79%)
Mutual labels:  proxy-server, mtproto, mtproxy
nimgram
An MTProto client written in Nim 👑
Stars: ✭ 61 (-31.46%)
Mutual labels:  mtproto, mtproxy
docker-network-tools
A Docker image with various network tools pre-installed.
Stars: ✭ 46 (-48.31%)
Mutual labels:  alpine
mailbox
📨 簡易電子報發送系統,使用 #Golang 實作,send campaign mail with open, click tracker.
Stars: ✭ 26 (-70.79%)
Mutual labels:  alpine
p3y
A single binary reverse proxy written in go. It was developed for use in Kubernetes, to wrap services like Prometheus with simple BasicAuth and TLS encryption.
Stars: ✭ 15 (-83.15%)
Mutual labels:  proxy-server
python-tdlib
full oop python 3 tdlib wrapper, fast, thread safe
Stars: ✭ 20 (-77.53%)
Mutual labels:  mtproto
docker-ansible
Alpine-based multistage-build version of Ansible for reproducible usage in CI
Stars: ✭ 168 (+88.76%)
Mutual labels:  alpine
http-knocking
🚪HTTP-Knocking hides a Web server and open it by knocking sequence: Hide Web server until your knocks
Stars: ✭ 28 (-68.54%)
Mutual labels:  proxy-server
docker-alpine-python2
The smallest Docker image with Python 2.7 (~50MB)
Stars: ✭ 36 (-59.55%)
Mutual labels:  alpine
docker-terraform-docs
Alpine-based multistage-build version of terraform-docs and terraform-docs-replace in multiple versions to be used for CI and other reproducible automations
Stars: ✭ 59 (-33.71%)
Mutual labels:  alpine
Free-Proxy
Hi there will be a lot of proxies here.
Stars: ✭ 135 (+51.69%)
Mutual labels:  proxy-server
docker-logstash-alpine
Alpine Linux based Logstash Docker Image
Stars: ✭ 50 (-43.82%)
Mutual labels:  alpine
docker-alpine
Docker Alpine Linux Base Images
Stars: ✭ 27 (-69.66%)
Mutual labels:  alpine
sparql-proxy
SPARQL-proxy: provides cache, job control, and logging for any SPARQL endpoint
Stars: ✭ 26 (-70.79%)
Mutual labels:  proxy-server
11ta-template
Deeply customizable, full-featured, ready to publish blog template built with 11ty, TailwindCSS, & Alpine.js
Stars: ✭ 98 (+10.11%)
Mutual labels:  alpine
LiveProxies
Asynchronous proxy checker
Stars: ✭ 17 (-80.9%)
Mutual labels:  proxy-server
nghttp2-alpine
Minimal nghttp2 docker image with ALPN support
Stars: ✭ 14 (-84.27%)
Mutual labels:  alpine
docker-opengl
Multi-Arch Docker - Mesa 3D OpenGL Software Rendering (Gallium) - LLVMpipe, and OpenSWR Drivers
Stars: ✭ 68 (-23.6%)
Mutual labels:  alpine
docker-squid
Squid in docker container based on Alpine Linux
Stars: ✭ 44 (-50.56%)
Mutual labels:  alpine

Telegram MTProto Proxy (Alpine)

The Telegram Messenger MTProto proxy is a zero-configuration container that automatically sets up a proxy server that speaks Telegram's native MTProto.

Quick reference

To start the proxy all you need to do is docker run -d -p443:443 --name=mtproxy --restart=always -v ./config:/data alexdoesh/mtproxy:latest

The container's log output (docker logs mtproxy) will contain the links to paste into the Telegram app:

[+] Using the explicitly passed secret: '00baadf00d15abad1deaa515baadcafe'.
[+] Saving it to /data/secret.
[*] Final configuration:
[*]   Secret 1: 00baadf00d15abad1deaa515baadcafe
[*]   tg:// link for secret 1 auto configuration: : tg://proxy?server=3.14.15.92&port=443&secret=00baadf00d15abad1deaa515baadcafe
[*]   t.me link for secret 1: tg://proxy?server=3.14.15.92&port=443&secret=00baadf00d15abad1deaa515baadcafe
[*]   Tag: no tag
[*]   External IP: 3.14.15.92
[*]   Make sure to fix the links in case you run the proxy on a different port.

The secret will persist across container upgrades in a volume. It is a mandatory configuration parameter: if not provided, it will be generated automatically at container start. You may forward any other port to the container's 443: be sure to fix the automatic configuration links if you do so.

Please note that the proxy gets the Telegram core IP addresses at the start of the container. We try to keep the changes to a minimum, but you should restart the container about once a day, just in case.

Registering your proxy

Once your MTProxy server is up and running go to @MTProxybot and register your proxy with Telegram to gain access to usage statistics and monetization.

Custom configuration

If you need to specify a custom secret (say, if you are deploying multiple proxies with DNS load-balancing), you may pass the SECRET environment variable as 16 bytes in lower-case hexidecimals.: docker run -d -p443:443 -v ./config:/data -e SECRET=00baadf00d15abad1deaa51sbaadcafe alexdoesh/mtproxy:latest

The proxy may be configured to accept up to 16 different secrets. You may specify them explicitly as comma-separated hex strings in the SECRET environment variable, or you may let the container generate the secrets automatically using the SECRET_COUNT variable to limit the number of generated secrets.

docker run -d -p443:443 -v ./config:/data -e SECRET=935ddceb2f6bbbb78363b224099f75c8,2084c7e58d8213296a3206da70356c81 telegrammessenger/proxy:latest docker run -d -p443:443 -v ./config:/data -e SECRET_COUNT=4 alexdoesh/mtproxy:latest

A custom advertisement tag may be provided using the TAG environment variable: docker run -d -p443:443 -v ./config:/data -e TAG=3f40462915a3e6026a4d790127b95ded alexdoesh/mtproxy:latest. Please note that the tag is not persistent: you'll have to provide it as an environment variable every time you run an MTProto proxy container.

A single worker process is expected to handle tens of thousands of clients on a modern CPU. For best performance we artificially limit the proxy to 60000 connections per core and run two workers by default. If you have many clients, be sure to adjust the WORKERS variable: docker run -d -p443:443 -v ./config:/data -e WORKERS=16 alexdoesh/mtproxy:latest

Monitoring

The MTProto proxy server exports internal statistics as tab-separated values over the http://localhost:2398/stats endpoint. Please note that this endpoint is available only from localhost: depending on your configuration, you may need to collect the statistics with docker exec mtproto-proxy curl http://localhost:2398/stats.

  • ready_targets: number of Telegram core servers the proxy will try to connect to.
  • active_targets: number of Telegram core servers the proxy is actually connected to. Should be equal to ready_targets.
  • total_special_connections: number of inbound client connections
  • total_max_special_connections: the upper limit on inbound connections. Is equal to 60000 multiplied by worker count.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].