github anton48/vk-turn-proxy srtp-build440
srtp-build440 — a keepalive that wakes a sleeping phone, a reaper that knows a zombie from a sleeping client, and the group a phone leaves

5 hours ago

The first server release since srtp-build306 (17 August). Deploy it
with iOS build 440, released together: that client names the group it
leaves at a network switch, which this server reaps at once. Older
clients work as before — without the notice an abandoned group lives to
the 150-s backstop, as on 306.

32736d5 — THE KEEPALIVE. On every connection silent for 45 s the server
repeats, byte for byte, the last probe echo it sent on that connection,
then every 60 s while the silence lasts; never before an echo, never on
a connection that has just spoken. Every released client already reads
such a packet as a pong. A phone dozing on Wi-Fi with the UDP relay leg
is woken by the first batch and its connections never reach the reaper
— overnight at home: 836 sleeps, none above 106 s, 0 kills, where the
night before without it had 599. On cellular with the UDP relay leg
nothing the server sends reaches a dozing phone (measured on two
carriers, at 45 s and at 30 s, and with WireGuard's own keepalive) —
the TCP relay leg is unaffected. Flags: -keepalive-after 45s,
-keepalive-every 1m0s; 0 restores the old behaviour.

THE REAPER. A member silent for 90 s while a neighbour in its group was
heard within 60 s is a zombie and is reaped early (-reap-zombie 1m30s);
a group silent as a whole is a sleeping client and keeps the 150-s
backstop. b6e89b5 + 841ad82: a zombie is judged only once its group has
been awake for 45 s (-zombie-awake 45s) — the first pings of a wake's
burst had made five healthy connections look like zombies — and the
group's wake clock is one value, published and read together (a reaper
tick between two stores had torn it). A group the client says it has
left (0xff 'S' 'U' 'P' + the old group id, right behind the new hello)
is reaped at the next tick.

a1c2f45 — a repeat is never written behind a fresher echo: one lock for
the echo and the repeat, the silence re-read at the write. A client
from before iOS build 422 stores the pong sequence unconditionally, and
a repeat overtaking a fresh echo would have moved its mark back.

"keepalive:" in every conn-stats dump; the reaper's line names its
reason; per-connection counters.

Binaries for linux (amd64/arm64/386/arm), darwin (amd64/arm64), windows
(amd64/386), freebsd/amd64 and android/arm64 are attached by CI.

Don't miss a new vk-turn-proxy release

NewReleases is sending notifications on new releases.