Highly-opinionated (ex-bullshit-free) MTPROTO proxy for Telegram. If you use v1.0 or upgrade broke you proxy, please read the chapter Version 2
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

docker-compose.yml 1.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # SNI-routing deployment: HAProxy (443) -> mtg + real web backend
  2. #
  3. # This setup puts an SNI-aware TCP router in front of mtg so that:
  4. # - Telegram clients (FakeTLS with the correct SNI) are routed to mtg
  5. # - All other TLS traffic (including DPI probes) reaches the real web
  6. # server, which responds with a genuine certificate
  7. #
  8. # The result: active probes see a real website; passive DPI sees matching
  9. # SNI/IP because the domain resolves to this server's IP.
  10. #
  11. # Quick start:
  12. # 1. Set YOUR_DOMAIN below (and in mtg-config.toml)
  13. # 2. docker compose up -d
  14. # 3. mtg generate-secret YOUR_DOMAIN -> put it in mtg-config.toml
  15. # 4. docker compose restart mtg
  16. #
  17. # See BEST_PRACTICES.md and the project wiki for background.
  18. services:
  19. haproxy:
  20. image: haproxy:lts-alpine
  21. ports:
  22. - "443:443"
  23. - "80:80"
  24. volumes:
  25. - ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
  26. depends_on:
  27. - mtg
  28. - web
  29. restart: unless-stopped
  30. mtg:
  31. image: nineseconds/mtg:2
  32. volumes:
  33. - ./mtg-config.toml:/config/config.toml:ro
  34. expose:
  35. - "3128"
  36. restart: unless-stopped
  37. web:
  38. image: caddy:alpine
  39. volumes:
  40. - ./Caddyfile:/etc/caddy/Caddyfile:ro
  41. - caddy_data:/data
  42. - ./www:/srv:ro
  43. expose:
  44. - "80"
  45. - "8443"
  46. environment:
  47. DOMAIN: ${DOMAIN:-example.com}
  48. restart: unless-stopped
  49. volumes:
  50. caddy_data: