Files
fips/testing/boringtun/docker-compose.yml
Martti Malmi b05c80e5f5 testing: add boringtun throughput benchmark and iperf ref-compare harness
New testing/boringtun/ harness runs two Cloudflare BoringTun userspace
WireGuard containers with iperf3 between them, giving a single-hop
userspace tunnel baseline for comparison against FIPS throughput
numbers. Local WG key generation runs through the harness image so the
host needs no wireguard-tools.

New testing/static/scripts/iperf-compare-refs.sh builds two git refs
into separate fips-test:* images via git worktree and runs the same
static iperf topology against both, with RUNS-based repetition and
aggregate avg/min/max reporting.

testing/static/scripts/iperf-test.sh gains DURATION, PARALLEL,
SETTLE_SECONDS, IPERF_TIMEOUT env knobs and a per-path iperf timeout.
testing/static/docker-compose.yml selects the image under test via
FIPS_TEST_IMAGE; testing/scripts/build.sh respects CARGO_TARGET_DIR.

Author benchmark on aarch64 Docker Desktop:
  boringtun bob -> alice : 1000.13 Mbits/sec
2026-05-15 18:03:42 +00:00

47 lines
1020 B
YAML

# Minimal 2-node boringtun setup for iperf3 throughput comparison.
# Both containers join the same docker bridge; each runs a boringtun
# userspace WireGuard tunnel and they peer with each other over UDP.
# Inner WG IPs: 10.99.0.1/24 (alice) <-> 10.99.0.2/24 (bob).
networks:
bt-net:
driver: bridge
ipam:
config:
- subnet: 172.99.0.0/24
x-boringtun-common: &boringtun-common
image: boringtun-test:latest
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun:/dev/net/tun
sysctls:
- net.ipv4.conf.all.forwarding=1
restart: "no"
env_file:
- ./generated/peers.env
services:
alice:
<<: *boringtun-common
container_name: bt-alice
hostname: alice
environment:
- ROLE=alice
- PEER_HOST=bob
networks:
bt-net:
ipv4_address: 172.99.0.10
bob:
<<: *boringtun-common
container_name: bt-bob
hostname: bob
environment:
- ROLE=bob
- PEER_HOST=alice
networks:
bt-net:
ipv4_address: 172.99.0.11