Files
magpie/docs
yetone 97e0ecdaab settings: a saved proxy's Test says its latency and exit region, from Settings and the provider editor (IcyLiqu1d on X)
IcyLiqu1d asked for sub2api-style proxy management: test each saved
proxy's region and latency, then pick a provider's proxy from the list.

- A saved proxy's row in Settings, once tested, reads "Reachable, 42 ms ·
  Japan": the exit's country from Cloudflare's trace page (the endpoint
  the quick check already uses), named in the reader's language by
  Intl.DisplayNames; the exit IP is in the tooltip. A failure says why.
- The latency is the round trip through the proxy, from the request
  written to the answer's first byte (httptrace). The whole request's
  time counted a new connection's dial, tunnel and TLS on a first Test
  and not on a second, which reuses the pooled connection.
- The provider editor's Saved mode has a Test beside the proxy picked;
  its answer is said where the picker's hint is, red on failure, until
  another proxy or mode is chosen.
- An editor opened before Settings was read drew its picker with no
  saved proxies (Saved mode missing, or "A proxy that is gone" for one
  chosen). It now reads the settings and draws the picker again.
- Nothing is tested until Test is clicked; nothing runs in the background.

Run (at this head's tree, rebased on c687dbdc6):
- mote: go test ./internal/gui -count=1 -timeout 45m: ok (182.9s);
  -run 'TestSavedProxy|TestProxyCheck' -race ok.
- mote: GOOS=linux go vet -tags nogui ./... and GOOS=windows go vet ./...
  ok; gofmt -l clean; TestCoreScriptBudget room 21 bytes, no raise.
- mica: provider-proxy-pick-test (new, 20 cases: chromium and webkit, en
  zh zh-TW ja de, 900 and 420px) 20/20; saved-proxies, saved-ssh-proxy,
  provider-proxy, i18n-keys, old-webkit pass.
- mica: whole GUI suite, still running at push: 3736 tests in, 127 red,
  none in a proxy or provider file. The reds are files red on
  origin/main: agent-details-ready and data-folder were run alone at
  c687dbdc6, 14 pass 42 fail (#6369, #6373, #6876); account-refresh-holds,
  account-arrange (#6003, #5814), api-key-theme (#6444) and the rest are
  the files another session is rerunning on mote as main's reds.
- Broken by hand: the round-trip branch off, TestSavedProxyLatencyIs
  TheRoundTrip went red ("took 1601 ms", the fake's 1.5s dial counted).

Tests reach no network: a local fake proxy answers the trace page, the
trace URL is .invalid, and the dial delay is injected.

Not tried: a real proxy's exit (the region comes from Cloudflare's loc=).
Not changed: the global proxy check in Settings still shows the raw
country code (ip (JP)).
2026-11-18 06:42:01 +08:00
..