Files
tailscale/control
James Tucker e0edbdac68 control/controlhttp: prefer post-quantum/P-384 HTTPS before HTTP and default HTTPS
Previously, the Noise control dialer preferred plaintext HTTP on port 80
and only fell back to HTTPS on port 443 for middlebox compatibility,
because Noise already encrypted the inner connection with X25519.

To protect control connections against near-term 256-bit ECC / quantum
concerns when the server supports stronger key exchange, without
sacrificing compatibility, dial in three staggered stages:

  1. TLS 1.3 with post-quantum key exchange (hybrid ML-KEM), falling
     back to P-384/P-521 (excluding 256-bit ECC curves X25519 and P-256)
  2. Plaintext HTTP (Noise over HTTP), unless forceNoise443 is set
  3. Default HTTPS using Go's default TLS settings (matching the
     existing Tailscale HTTPS fallback)

Also adds clientmetric counters for the negotiated transport
(controlhttp_dial_pq_https, controlhttp_dial_p384_https,
controlhttp_dial_http, controlhttp_dial_classic_https) and a
TS_DISABLE_NOISE_PQ_HTTPS envknob to restore the legacy HTTP-first order.

Updates #21022
Updates tailscale/corp#52709

Change-Id: I9f1d264ee196a58e75857b4401be8185de4b3e3e
Signed-off-by: James Tucker <[email protected]>
(cherry picked from commit 35f4a6e55a)
2026-12-03 20:51:04 -08:00
..