Explorar el Código

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 hace 1 semana
padre
commit
5d9a5efb8f
Se han modificado 1 ficheros con 6 adiciones y 3 borrados
  1. 6
    3
      contrib/sni-router/README.md

+ 6
- 3
contrib/sni-router/README.md Ver fichero

47
 
47
 
48
 HAProxy forwards TCP connections to mtg and Caddy with a PROXY protocol
48
 HAProxy forwards TCP connections to mtg and Caddy with a PROXY protocol
49
 v2 header so both backends see the real client IP instead of HAProxy's
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
 - `haproxy.cfg` — `send-proxy-v2` on the `mtg` and `web` backend `server` lines
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
 - `Caddyfile` — `listener_wrappers { proxy_protocol { ... } tls }` on `:8443`
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
 to parse the connection.
60
 to parse the connection.
58
 
61
 
59
 ## Fronting loop (why `[domain-fronting]` is set explicitly)
62
 ## Fronting loop (why `[domain-fronting]` is set explicitly)

Loading…
Cancelar
Guardar