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 символов.

1234567891011121314151617181920212223242526272829303132
  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.
  13. # 127.0.0.1/32 covers HAProxy reaching Caddy over host loopback (HAProxy
  14. # runs in network_mode: host and connects to the published 127.0.0.1
  15. # port). The RFC1918 ranges cover mtg → Caddy on the compose bridge
  16. # (fronting path; see "Fronting loop" in README.md).
  17. servers :8443 {
  18. listener_wrappers {
  19. proxy_protocol {
  20. timeout 5s
  21. allow 127.0.0.1/32 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16
  22. }
  23. tls
  24. }
  25. }
  26. }
  27. {$DOMAIN} {
  28. root * /srv
  29. file_server
  30. }