Kaynağa Gözat

sni-router: extend PROXY-protocol sync list to four pieces

mtg now also sends PROXY v2 on the fronting dial (introduced in the
previous commit via [domain-fronting].proxy-protocol = true), so the
"Real client IPs" section's sync list must include that fourth piece.
Without it, an operator who disables Caddy's PROXY listener wrapper
without also flipping [domain-fronting].proxy-protocol will leave mtg
sending an unparsed PROXY v2 prefix to Caddy on every fronted probe.
pull/478/head
Alexey Dolotov 6 gün önce
ebeveyn
işleme
5d9a5efb8f
1 değiştirilmiş dosya ile 6 ekleme ve 3 silme
  1. 6
    3
      contrib/sni-router/README.md

+ 6
- 3
contrib/sni-router/README.md Dosyayı Görüntüle

@@ -47,13 +47,16 @@ docker compose exec mtg mtg access /config/config.toml
47 47
 
48 48
 HAProxy forwards TCP connections to mtg and Caddy with a PROXY protocol
49 49
 v2 header so both backends see the real client IP instead of HAProxy's
50
-container address.  The three pieces must stay in sync:
50
+container address.  Caddy also receives PROXY v2 from mtg on the
51
+fronting path (see "Fronting loop" below), so all four pieces below
52
+must stay in sync:
51 53
 
52 54
 - `haproxy.cfg` — `send-proxy-v2` on the `mtg` and `web` backend `server` lines
53
-- `mtg-config.toml` — `proxy-protocol-listener = true`
55
+- `mtg-config.toml` — `proxy-protocol-listener = true` (HAProxy → mtg)
56
+- `mtg-config.toml` — `[domain-fronting].proxy-protocol = true` (mtg → Caddy on fronting)
54 57
 - `Caddyfile` — `listener_wrappers { proxy_protocol { ... } tls }` on `:8443`
55 58
 
56
-If you disable one, disable all three, otherwise the backend will fail
59
+If you disable one, disable all four, otherwise the backend will fail
57 60
 to parse the connection.
58 61
 
59 62
 ## Fronting loop (why `[domain-fronting]` is set explicitly)

Loading…
İptal
Kaydet