IPv6

tcpcc supports IPv6 on the public side while keeping the application backend on ordinary IPv4 loopback.

Direct CLI

Bracket the IPv6 literal:

sudo tcpcc \
  --forward '[2001:db8::10]:443=127.0.0.1:8443' \
  --cc bbr

TOML

version = 1
cc = "bbr"
memory_mib = 128

[[forward]]
listen = "[2001:db8::10]:443"
backend = "127.0.0.1:8443"

TUN addresses

With an IPv6 public listener and no explicit TUN addresses, tcpcc uses:

host:   fd00:198:18::1
hosted: fd00:198:18::2

Explicit TUN addresses must also be IPv6 and the host/hosted addresses must differ.

Host prerequisite

IPv6 public routing requires:

sysctl net.ipv6.conf.all.forwarding

The expected value is 1.

Backend remains IPv4 loopback

This is intentional:

IPv6 public TCP
       ↓
hosted IPv6 TCP listener
       ↓
byte stream
       ↓
separate TCP connection
       ↓
127.0.0.1 backend

The backend application does not need to bind an IPv6 socket merely because the public endpoint is IPv6.

Mixed-family listeners

One tcpcc process cannot currently combine IPv4 and IPv6 public listeners. Run separate processes if the deployment requires both families.