You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ping_all misreports path: count>1 parses only the first pong, and peer relays are labeled direct #33
ping_all's main selling point is telling a direct path apart from a relayed one (README: "works but relayed" vs "fast direct path"). Two parsing issues make that answer wrong in common cases.
count > 1 reports the first pong, not the settled path.tailscale ping keeps pinging (through DERP) until a direct path comes up and then stops. With count: 3 the output is usually via DERP(...) followed by via 1.2.3.4:41641. exec takes the first line, so the tool reports derp and the DERP latency even though the connection just went direct.
Anything that isn't DERP(...) is classified direct. Tailscale's peer relays (1.86+) print a via peer-relay(...)-style endpoint, which the regex labels "direct". That's misleading in exactly the "why is this slow" case. Please verify the exact string against a current CLI.
Only one latency number is reported for multi-attempt pings. There's no min/avg or loss count.
Suggested approach
Parse all pong lines. Report the final path plus latencyMs (last or min), attempts, and replies.
Make path a closed enum (direct | derp | peer-relay | unknown) and keep the raw via string.
Add fixture tests from captured multi-pong and peer-relay output.
Done when
A DERP→direct upgrade within one call reports direct, a peer-relay path is never reported as direct, and fixtures cover both.
Activity