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
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930
  1. # Minimal mtg configuration for the SNI-router setup.
  2. #
  3. # 1. Generate a secret: mtg generate-secret --hex example.com
  4. # 2. Paste it below.
  5. # 3. Replace example.com with your actual domain everywhere.
  6. secret = "PASTE_YOUR_SECRET_HERE"
  7. bind-to = "0.0.0.0:3128"
  8. # HAProxy in front sends PROXY protocol v2 headers so mtg can see the
  9. # real client IP. Keep this in sync with haproxy.cfg (`send-proxy-v2`).
  10. proxy-protocol-listener = true
  11. # Domain-fronting target. Without an explicit IP here, mtg resolves the
  12. # secret's hostname via DNS, which points back to this server -> lands
  13. # on HAProxy -> SNI matches the secret -> routed back to mtg -> loop.
  14. #
  15. # The IP below pins Caddy's container address (see docker-compose.yml
  16. # `networks.sni.ipv4_address`) so mtg dials Caddy directly, bypassing
  17. # HAProxy. `proxy-protocol = true` matches Caddy's :8443 listener
  18. # wrapper so the real client IP propagates end-to-end.
  19. [domain-fronting]
  20. ip = "172.28.0.10"
  21. port = 8443
  22. proxy-protocol = true
  23. [defense.anti-replay]
  24. enabled = true
  25. max-size = "1mib"
  26. error-rate = 0.001