mirror of
https://github.com/jmcorgan/fips.git
synced 2026-07-30 19:46:15 +00:00
docs(sidecar): make UDP MTU env-overridable end-to-end
The sidecar entrypoint hardcoded `udp.mtu: 1472`, the Docker-bridge IPv4 maximum (1500 MTU - 8 UDP - 20 IPv4 header). Promote it to `FIPS_UDP_MTU` (defaulting to 1472, preserving behavior) so non-Docker reuses of the example can override without editing the script. Plumb the env var through `docker-compose.yml` so a host-level setting reaches the container, and add a row to the README's env-var table. Also annotate the static-CI node template with a comment explaining the same 1472 rationale and the daemon's 1280 default. The template keeps 1472 as the literal value since the CI suite runs on a Docker bridge where that's correct. No behavior change unless the host explicitly sets FIPS_UDP_MTU.
This commit is contained in:
@@ -187,6 +187,7 @@ docker exec sidecar-nostr-relay-app-1 ping -c1 127.0.0.1
|
||||
| `FIPS_TCP_BIND` | `0.0.0.0:8443` | TCP transport bind address |
|
||||
| `FIPS_PEER_TRANSPORT` | `udp` | Peer transport type (`udp` or `tcp`) |
|
||||
| `FIPS_TUN_MTU` | `1280` | TUN interface MTU |
|
||||
| `FIPS_UDP_MTU` | `1472` | UDP transport MTU (default is Docker bridge IPv4 max; set to `1280` for IPv6-min-safe deploys) |
|
||||
| `FIPS_NETWORK` | `fips-sidecar-net` | Docker network name (set to join external network) |
|
||||
| `FIPS_SUBNET` | `172.20.1.0/24` | Docker network subnet |
|
||||
| `FIPS_IPV4` | `172.20.1.20` | Sidecar's IPv4 address on the Docker network |
|
||||
|
||||
@@ -31,6 +31,7 @@ services:
|
||||
- FIPS_PEER_ALIAS=${FIPS_PEER_ALIAS:-peer}
|
||||
- FIPS_UDP_BIND=${FIPS_UDP_BIND:-0.0.0.0:2121}
|
||||
- FIPS_TUN_MTU=${FIPS_TUN_MTU:-1280}
|
||||
- FIPS_UDP_MTU=${FIPS_UDP_MTU:-1472}
|
||||
- FIPS_PEER_TRANSPORT=${FIPS_PEER_TRANSPORT:-udp}
|
||||
volumes:
|
||||
- ./resolv.conf:/etc/resolv.conf:ro
|
||||
|
||||
@@ -8,6 +8,7 @@ FIPS_NSEC="${FIPS_NSEC:?FIPS_NSEC is required}"
|
||||
FIPS_UDP_BIND="${FIPS_UDP_BIND:-0.0.0.0:2121}"
|
||||
FIPS_TCP_BIND="${FIPS_TCP_BIND:-0.0.0.0:8443}"
|
||||
FIPS_TUN_MTU="${FIPS_TUN_MTU:-1280}"
|
||||
FIPS_UDP_MTU="${FIPS_UDP_MTU:-1472}"
|
||||
FIPS_PEER_TRANSPORT="${FIPS_PEER_TRANSPORT:-udp}"
|
||||
|
||||
mkdir -p /etc/fips
|
||||
@@ -41,7 +42,9 @@ dns:
|
||||
transports:
|
||||
udp:
|
||||
bind_addr: "${FIPS_UDP_BIND}"
|
||||
mtu: 1472
|
||||
# 1472 = Docker bridge IPv4 max (1500 MTU - 8 UDP - 20 IPv4 header).
|
||||
# Override with FIPS_UDP_MTU=1280 for IPv6-min-safe deploys.
|
||||
mtu: ${FIPS_UDP_MTU}
|
||||
tcp:
|
||||
bind_addr: "${FIPS_TCP_BIND}"
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ dns:
|
||||
transports:
|
||||
udp:
|
||||
bind_addr: "0.0.0.0:2121"
|
||||
# Docker bridge supports 1500-MTU IPv4 so 1472 is safe here.
|
||||
# Operator-facing daemon default is 1280 (IPv6 minimum).
|
||||
mtu: 1472
|
||||
# recv_buf_size: 2097152 # 2 MB (default)
|
||||
# send_buf_size: 2097152 # 2 MB (default)
|
||||
|
||||
Reference in New Issue
Block a user