With "IPv6 к серверу первым" on, a WireGuard/AWG server with one peer
now gets both address families. The app passes the preferred family
(remembered in server_family.MEMORY, IPv6 otherwise) as the peer
address and the other one as race_address. zapret-amnezia.exe sends the
first handshake to both; the server answers one copy (the second has
the same TAI64N timestamp and is a replay for it) and the bind keeps
that family for the session. Unanswered retries alternate families, so
a family that loses only the replies cannot win every time. No added
delay and no restart.
- runtime/amnezia/family_race.go: the same race as Android core patch
0021 (parity test), atomic fast path once decided.
- The helper reports only the family (address_family event), never the
address; the app remembers it per server name until a network change.
- The physical uplink is found through whichever peer address is IPv4.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>