Explorar el Código

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.
pull/478/head
Alexey hace 1 semana
padre
commit
0f7c58e2ad
Se han modificado 2 ficheros con 11 adiciones y 3 borrados
  1. 9
    1
      contrib/sni-router/README.md
  2. 2
    2
      contrib/sni-router/docker-compose.yml

+ 9
- 1
contrib/sni-router/README.md Ver fichero

83
 true` matches Caddy's `:8443` listener wrapper so the real client IP
83
 true` matches Caddy's `:8443` listener wrapper so the real client IP
84
 still propagates to Caddy's logs.
84
 still propagates to Caddy's logs.
85
 
85
 
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.
87
 
95
 
88
 ## ACME (Let's Encrypt) notes
96
 ## ACME (Let's Encrypt) notes
89
 
97
 

+ 2
- 2
contrib/sni-router/docker-compose.yml Ver fichero

31
     sysctls:
31
     sysctls:
32
       - net.ipv4.ip_unprivileged_port_start=80
32
       - net.ipv4.ip_unprivileged_port_start=80
33
     networks:
33
     networks:
34
-      sni:
34
+      - sni
35
 
35
 
36
   mtg:
36
   mtg:
37
     image: nineseconds/mtg:2
37
     image: nineseconds/mtg:2
43
     extra_hosts:
43
     extra_hosts:
44
       - "host.containers.internal:host-gateway"
44
       - "host.containers.internal:host-gateway"
45
     networks:
45
     networks:
46
-      sni:
46
+      - sni
47
 
47
 
48
   web:
48
   web:
49
     image: caddy:alpine
49
     image: caddy:alpine

Loading…
Cancelar
Guardar