Skip to content

Commit 88a0e2c

Browse files
committed
sni-router: review fixes — compose style, subnet caveat, IPv6 note
- Use list form for `networks: [sni]` on services that need no per-network config; keep map form only on `web` where ipv4_address requires it. - README: note that the 172.28.0.0/24 subnet can be changed if it collides with an existing host network (and remind to update both files in lockstep). - README: caveat that IPv6 fronting may lose the real client IP in Caddy's logs because mtg constructs a mixed-family PROXY v2 header (IPv6 source, IPv4 destination); Telegram traffic unaffected.
1 parent 1fb9fbb commit 88a0e2c

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

contrib/sni-router/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,15 @@ IP, not a hostname, hence the static `sni` network). `proxy-protocol =
8383
true` matches Caddy's `:8443` listener wrapper so the real client IP
8484
still propagates to Caddy's logs.
8585

86-
If you change Caddy's pinned IP, update both files together.
86+
If you change Caddy's pinned IP, update both files together. If
87+
`172.28.0.0/24` collides with another network on this host, change the
88+
subnet in `docker-compose.yml` and the IP in `mtg-config.toml` to match.
89+
90+
> Caveat for IPv6 clients: when an IPv6 probe is fronted, mtg's
91+
> outbound PROXY v2 header has an IPv6 source but an IPv4 destination
92+
> (Caddy's pinned address). Caddy may refuse the mixed-family header
93+
> and log the docker-network address instead of the real client IP for
94+
> that connection. Telegram traffic is unaffected.
8795
8896
## ACME (Let's Encrypt) notes
8997

contrib/sni-router/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ services:
2929
- web
3030
restart: unless-stopped
3131
networks:
32-
sni:
32+
- sni
3333

3434
mtg:
3535
image: nineseconds/mtg:2
@@ -39,7 +39,7 @@ services:
3939
- "3128"
4040
restart: unless-stopped
4141
networks:
42-
sni:
42+
- sni
4343

4444
web:
4545
image: caddy:alpine

0 commit comments

Comments
 (0)