From 4c9b37fa2e629eb740cecd5cb699410e1deb3b91 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 1 Apr 2025 04:01:00 -0700 Subject: [PATCH] control/controlhttp: set forceNoise443 on Plan 9 Updates #5794 Change-Id: Idc67082f5d367e03540e1a5310db5b466ee03666 Signed-off-by: Brad Fitzpatrick --- control/controlhttp/client.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/control/controlhttp/client.go b/control/controlhttp/client.go index 3b95796d0..e971f1253 100644 --- a/control/controlhttp/client.go +++ b/control/controlhttp/client.go @@ -270,6 +270,15 @@ var forceNoise443 = envknob.RegisterBool("TS_FORCE_NOISE_443") // use HTTPS connections as its underlay connection (double crypto). This can // be necessary when networks or middle boxes are messing with port 80. func (d *Dialer) forceNoise443() bool { + if runtime.GOOS == "plan9" { + // For running demos of Plan 9 in a browser with network relays, + // we want to minimize the number of connections we're making. + // The main reason to use port 80 is to avoid double crypto + // costs server-side but the costs are tiny and number of Plan 9 + // users doesn't make it worth it. Just disable this and always use + // HTTPS for Plan 9. That also reduces some log spam. + return true + } if forceNoise443() { return true }