|
|
@@ -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)
|