chore: include if direct connection is over private network in ping diagnostics (#15313)

Whilst the `networking-troubleshooting` docs page already mentions that
a direct connection can be established over a private network, even if
there are no STUN servers, it's worth this is the case at the end of the
ping output.

This also removes a print statement that was dirtying up the diagnostic
output, and corrects the name of the `--disable-direct-connections`
flag.
This commit is contained in:
Ethan
2024-11-12 17:33:35 +11:00
committed by GitHub
parent c519a129fc
commit 6117f46706
2 changed files with 27 additions and 6 deletions
+2 -1
View File
@@ -411,7 +411,8 @@ func (d ConnDiags) splitDiagnostics() (general, client, agent []string) {
}
if d.DisableDirect {
general = append(general, "❗ Direct connections are disabled locally, by `--disable-direct` or `CODER_DISABLE_DIRECT`")
general = append(general, "❗ Direct connections are disabled locally, by `--disable-direct-connections` or `CODER_DISABLE_DIRECT_CONNECTIONS`.\n"+
" They may still be established over a private network.")
if !d.Verbose {
return general, client, agent
}