tailscale/cmd/derper
Brad Fitzpatrick 15fc6cd966 derp/derphttp: fix netcheck HTTPS probes
The netcheck client, when no UDP is available, probes distance using
HTTPS.

Several problems:

* It probes using /derp/latency-check.
* But cmd/derper serves the handler at /derp/probe
* Despite the difference, it work by accident until c8f4dfc8c0
  which made netcheck's probe require a 2xx status code.
* in tests, we only use derphttp.Handler, so the cmd/derper-installed
  mux routes aren't preesnt, so there's no probe. That breaks
  tests in airplane mode. netcheck.Client then reports "unexpected
  HTTP status 426" (Upgrade Required)

This makes derp handle both /derp/probe and /derp/latency-check
equivalently, and in both cmd/derper and derphttp.Handler standalone
modes.

I notice this when wgengine/magicsock TestActiveDiscovery was failing
in airplane mode (no wifi). It still doesn't pass, but it gets
further.

Fixes #11989

Change-Id: I45213d4bd137e0f29aac8bd4a9ac92091065113f
2024-05-03 08:24:24 -07:00
..
bootstrap_dns_test.go cmd/derper,tstest/nettest: skip network-needing test in airplane mode 2024-05-03 08:24:24 -07:00
bootstrap_dns.go cmd/derper: count bootstrap dns unique lookups. 2023-08-17 08:02:56 -07:00
cert.go cmd/derper: disable http2 2023-04-26 20:45:32 -07:00
depaware.txt net/{interfaces,netmon}, all: merge net/interfaces package into net/netmon 2024-04-28 07:34:52 -07:00
derper_test.go cmd/{derper,stund},net/stunserver: add standalone stun server 2024-01-08 16:22:33 -08:00
derper.go derp/derphttp: fix netcheck HTTPS probes 2024-05-03 08:24:24 -07:00
mesh.go net/netns, net/dns/resolver, etc: make netmon required in most places 2024-04-27 12:17:45 -07:00
websocket.go net/wsconn: accept a remote addr string and plumb it through 2023-08-29 16:57:16 -07:00