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. {
  2. # Caddy sits behind HAProxy which passes raw TLS through on :8443.
  3. # ACME HTTP-01 challenges arrive on :80 via HAProxy's acl passthrough.
  4. http_port 80
  5. https_port 8443
  6. # HAProxy forwards connections to :8443 with a PROXY protocol v2
  7. # header (see haproxy.cfg `send-proxy-v2`). The proxy_protocol
  8. # listener wrapper strips the header and exposes the real client IP
  9. # to Caddy's access log. The `tls` wrapper must follow so that TLS
  10. # is terminated on the unwrapped connection.
  11. #
  12. # `allow` lists the networks permitted to send PROXY headers. These
  13. # ranges cover docker compose's default bridge networks; tighten
  14. # them if you pin a specific subnet in docker-compose.yml.
  15. servers :8443 {
  16. listener_wrappers {
  17. proxy_protocol {
  18. timeout 5s
  19. allow 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16
  20. }
  21. tls
  22. }
  23. }
  24. }
  25. {$DOMAIN} {
  26. root * /srv
  27. file_server
  28. }