测试各地址响应速度,按延迟从低到高排名
Round-trip time from your browser to each API endpoint — the network part you actually pay for, not the model's thinking time. Every visitor measures their own network, so the ranking is theirs, not the author's.
performance.now() is read immediately before and after an
await fetch(...). The difference is the request's wall-clock time.mode:'no-cors', so no Access-Control-Allow-Origin
header is needed — the response arrives opaque (body unreadable, status 0).
We never read the body; we only need the moment it resolves.AbortController cancels the request after 5 s, so a dead endpoint
becomes a null → shown as 超时 (timeout) instead of hanging the page.renderResults() sorts by that average with unknowns last, and paints
rank-1/2/3 badges on the first three cards.testUrl is deliberately a cheap /health path: latency,
not throughput, and no quota is spent on your API key.Those mirrors answer on plain http://…:11223 with no TLS. A page served
over https:// is not allowed to open an http:// request
(mixed content), so the browser refuses before any packet leaves. The guard reports
⛔ mixed content rather than a fake 0 ms or a fake timeout. Open this same
file from disk (file://) or over http:// and all of them test
normally.
Copy of a relay's own address tester (API地址延迟测试) —
markup, CSS and measurement logic are the original; the HTTPS endpoints, the
mixed-content guard and this panel were added so it runs on an HTTPS site.