Files
magpie/internal
yetone cf5a6f9cfd gui: the proxy test says a TUN may share one exit when the proxy took the request, not "no proxy" (#2369, Emt-lin)
The proxy test compared the exit IP through the proxy with the direct one,
and called the same address "they leave as if there were no proxy". Under
a TUN or system VPN every request leaves from one exit, so a working proxy
read as not in effect.

The leg through the proxy now records what it can see: the connection that
carried it (httptrace GotConn's RemoteAddr) and the proxy netproxy chose for
the URL. It is Proxied when that connection is the proxy's (same port, the
default by scheme; the host as an IP or resolved). With the same exit IP:
- Proxied: "The proxy took the requests, but they leave from {where} as
  direct ones do: a TUN or system VPN may send every request out one exit,
  so the address can't tell the two paths apart" (not a failure);
- not Proxied (bypassed by NO_PROXY or the system bypass list): "...didn't
  connect to it ...: the proxy is passed by" (a failure).
The verdict is made only in app.js's proxyCheckText; no CLI, TUI or plugin
path makes it.

Run:
- go test -race -count=3 -run TestProxyCheck ./internal/gui/: ok.
  New: TestProxyCheckSaysTheProxyTookItUnderOneExit (the proxy answers with
  the direct leg's IP), TestProxyCheckSaysAProxyPassedBy (NO_PROXY),
  TestProxyCheckConnectedToByName; TellsTheProxyFromDirect also checks
  Proxied.
- Broken by hand: no Proxied assignment turns TellsTheProxyFromDirect and
  SaysTheProxyTookItUnderOneExit red; Proxied always true turns
  SaysAProxyPassedBy red; origin/main's app.js turns proxy-test's
  "one-exit" case red.
- GUI: proxy-test.test.cjs 22/22 in Chromium and WebKit (1100 and 420, en,
  zh, zh-TW, ja, de); gui-de, gui-ja, gui-zh-tw, i18n-keys 12/12.
- Real use: a local CONNECT proxy named by localhost, to the real
  Cloudflare trace: through Proxied true, direct Proxied false, one
  CONNECT, the same exit both ways (the reporter's case). A real TUN was
  not tried.
- gofmt -l clean; go vet ./... (darwin), GOOS=linux and GOOS=windows
  go vet -tags nogui ./..., and GOOS=windows go vet ./...: ok.
- Not fixed here: at 420px the proxy row's mode control overlaps a long
  check line; origin/main's "down" message does the same.

Suite run here: HOME=<sandbox> go test -tags nogui -timeout 45m ./...: 62 ok,
internal/gateway FAIL only on TestOTelFastRequestTranscriptDiscovery/true
("request must still have a cached discovery miss"), open as #1811 (red
under load; load average ~170 here); it and its sibling pass -count=3
alone.

Full suite: SUITE_LINE
2026-10-15 23:08:05 +08:00
..
…
…
…