mirror of https://github.com/ospab/ostp.git
UoT took 20-30s (sometimes 1-2 min) to come up on mobile. The TCP connect had no timeout, so it inherited the kernel's SYN retry budget. Callers resolve every address for the server and deliberately try IPv6 first (perform_handshake_with_id sorts is_ipv6 to the front); a mobile network that advertises IPv6 without a working route blackholes the SYN instead of rejecting it, so the client sat through that entire budget before reaching the IPv4 address that would have connected immediately. UDP never showed this because connect() on a UDP socket just sets the default peer and returns. Capped at 4s per address, so a blackholed candidate costs seconds and the next one is tried. Left the IPv6-first ordering alone: it is what makes IPv6-only and NAT64 networks work, and with the cap its worst case is now bounded. (A further win would be remembering which family last succeeded and trying that first, removing even those 4s — not done here.) Also, per the earlier UI requests: - The connected state drew its aura, ring, icon and status dot from the theme's `secondary`, which is #AAAAAA and reads as plain white, giving no confirmation the tunnel was actually up. Now green, reusing the green already used for a healthy ping so "green = good" stays consistent. Applied at the call sites rather than to the theme, since `secondary` also paints routing toggles, the download metric and settings switches. - Ping now updates itself from the metrics stream that was already arriving, instead of needing the "Test Ping" button, and is rendered as a compact icon + value. |
||
|---|---|---|
| .. | ||
| models | ||
| ui | ||
| main.dart | ||