Edge Path Explorer: measure the path instead of simulating it - #2
Merged
Merged
Conversation
The Route Model draws a plausible great-circle path with generated intermediate hops, because a browser cannot send ICMP or set an IP TTL. Rather than keep improving a simulation, this adds a tool built only on things the browser can actually observe. Four real measurements: - Connection phase breakdown from the Performance Timeline: DNS, TCP, TLS, time-to-first-byte and transfer, per origin. Two failure modes are detected and reported rather than rendered as zeros. Cross-origin responses without a Timing-Allow-Origin header have every phase timestamp zeroed by spec, and a reused connection has no handshake to measure at all — both would otherwise read as "0 ms". - Which CDN edge answered, via speed.cloudflare.com/meta and, for Cloudflare-fronted hosts, /cdn-cgi/trace. The IATA colo code resolves against a bundled airport table (~170 entries) to a real coordinate; an unknown code is flagged rather than guessed. - HTTP/3 negotiation across four h3-capable origins. If all of them fall back to HTTP/2, the browser tried QUIC and failed, which is direct evidence that UDP/443 is blocked upstream. - Latency horizon: light travels ~200 km/ms in fibre, so a round trip puts a hard ceiling on distance. Drawn as a constraint ring — the endpoint is somewhere inside it. Queuing delay only loosens the bound, so this is a proof rather than an estimate. The Cloudflare meta call also replaces three separate third-party GeoIP providers for client identity, and the answer comes from the network element actually handling the traffic rather than a lookup database. New EdgeMap component draws only points with verifiable coordinates, and builds all popup content as DOM nodes with textContent — the same treatment applied to the route map after the XSS fix. The Route Model is kept, relabelled "SIM" in the nav and demoted from the dashboard hero, so existing history still renders. Also discloses the three new probe origins in the privacy statement and README, adds edgepath to the CSV/ZIP export with an Availability column so a blank phase is never read as zero, and adds geoip and edgepath to the history type filters. Verified with 24 new unit tests over the phase parser, trace parser, colo resolution, distance bound and protocol classifier, plus a Chromium run of both paths: 7/7 checks on the failure path (no fabricated timings when the probes cannot be reached) and 9/9 on the success path with the network stubbed, confirming correct TCP/TLS separation, colo resolution, distance calculation, map markers and constraint rings. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dz4sWqBnBqN12tDaDn6b8D
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The Route Model draws a plausible great-circle path with generated intermediate hops, because a browser cannot send ICMP packets or set an IP TTL. The previous PR made that honest with a banner. This PR makes it unnecessary, by building a tool out of things the browser can genuinely observe.
The four real measurements
1. Connection phase breakdown — DNS → TCP → TLS → TTFB → transfer, per origin, from the Performance Timeline.
Two failure modes are detected and reported rather than rendered as zeros, which is the whole difficulty of using this API honestly:
Timing-Allow-Originhas every phase timestamp zeroed by spec. Those are not "0 ms".fetchStart.TLS is subtracted from the connect window so TCP and TLS are reported separately rather than lumped together.
2. Which CDN edge answered —
speed.cloudflare.com/metafor your own connection, and/cdn-cgi/tracefor a host you name. The IATA colo code resolves against a bundled ~170-entry airport table to a real coordinate; an unknown code is flagged, not guessed.This also replaces three separate third-party GeoIP providers for client identity — and the answer now comes from the network element actually handling your traffic rather than a lookup database.
3. HTTP/3 negotiation — across four h3-capable origins. If every one falls back to HTTP/2, the browser tried QUIC and failed, which is direct evidence UDP/443 is blocked upstream. No readable protocol reports as unavailable, never as a negative.
4. Latency horizon — light travels ~200 km/ms in fibre, so a round trip puts a hard ceiling on distance. Drawn as a constraint ring: the endpoint is somewhere inside it. Queuing delay only loosens the bound, which makes this a proof rather than an estimate.
What it looks like
The summary answers the question directly — "Your traffic enters at LHR, London, United Kingdom" — instead of burying it in a map popup. Below that: a proportional phase waterfall per origin, an HTTP/3 verdict, and a map showing only points with verifiable coordinates.
Verification
npm run check— strict typecheck clean, 0 lint errors, 84 tests passing.The success-path test caught a real gap during development: the target host's edge was measured but only reachable by opening a map popup. It now has its own summary row.
Housekeeping
cdn.jsdelivr.net,cdnjs.cloudflare.com,unpkg.com) are disclosed in the privacy statement and README. A tool that enumerates what leaves your browser has to keep doing so when it adds probes.edgepathadded to CSV/ZIP export with an Availability column, so a blank phase is never mistaken for zero.geoipandedgepathadded to the history type filters.SIMin the nav and demoted from the dashboard hero, so existing history still renders.Generated by Claude Code