Move HAProxy into the host network namespace so it sees the real client source IP on inbound connections. With bridge networking + published ports the source IP is rewritten to the bridge gateway by the runtime (Docker's userland-proxy, rootless Podman's slirp4netns or pasta), and the PROXY v2 header HAProxy then sends to mtg and Caddy carries that useless address. mtg and Caddy stay on the compose bridge and publish their ports on host loopback; the host-mode HAProxy dials them at 127.0.0.1. Caddy's proxy_protocol allow list is tightened to loopback only. The 'sysctls: net.ipv4.ip_unprivileged_port_start=80' line is removed because Docker refuses to apply namespaced sysctls when the netns is shared with the host. Rootless Podman users binding the privileged ports need the equivalent host-side sysctl once; this is documented in README.md. Fixes #498.contrib/sni-router-host-mode
|
||
| 10 | 10 |
|
| 11 | 11 |
|
| 12 | 12 |
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 | 16 |
|
| 17 | 17 |
|
| 18 | 18 |
|
| 19 | 19 |
|
| 20 |
|
|
| 20 |
|
|
| 21 | 21 |
|
| 22 | 22 |
|
| 23 | 23 |
|
|
||
| 58 | 58 |
|
| 59 | 59 |
|
| 60 | 60 |
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 65 |
|
|
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|
| 69 |
|
|
| 70 |
|
|
| 71 |
|
|
| 72 |
|
|
| 73 |
|
|
| 74 |
|
|
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 79 |
|
|
| 80 |
|
|
| 81 |
|
|
| 82 |
|
|
| 83 |
|
|
| 84 |
|
|
| 61 | 85 |
|
| 62 | 86 |
|
| 63 | 87 |
|
|
||
| 24 | 24 |
|
| 25 | 25 |
|
| 26 | 26 |
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 27 |
|
|
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
|
| 30 | 33 |
|
| 31 | 34 |
|
| 32 | 35 |
|
|
||
| 35 | 38 |
|
| 36 | 39 |
|
| 37 | 40 |
|
| 38 |
|
|
| 39 |
|
|
| 40 | 41 |
|
| 41 | 42 |
|
| 42 | 43 |
|
| 43 | 44 |
|
| 44 | 45 |
|
| 45 |
|
|
| 46 |
|
|
| 46 |
|
|
| 47 |
|
|
| 48 |
|
|
| 47 | 49 |
|
| 48 | 50 |
|
| 49 | 51 |
|
|
||
| 54 | 56 |
|
| 55 | 57 |
|
| 56 | 58 |
|
| 57 |
|
|
| 58 |
|
|
| 59 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
|
| 60 | 65 |
|
| 61 | 66 |
|
| 62 | 67 |
|
|
||
| 50 | 50 |
|
| 51 | 51 |
|
| 52 | 52 |
|
| 53 |
|
|
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 54 | 57 |
|
| 55 | 58 |
|
| 56 | 59 |
|
| 57 | 60 |
|
| 58 | 61 |
|
| 59 |
|
|
| 62 |
|
|
| 60 | 63 |
|
| 61 | 64 |
|
| 62 | 65 |
|
| 63 |
|
|
| 66 |
|
|
| 67 |
|
|
| 68 |
|
|