In general, it's very difficult for users to learn on their own why direct connections aren't working. We provide tools like `coder netcheck` and `coder ping` which seem designed for our engineers than end users. For example, these are the first few lines of `coder ping -v`: ``` I ~ coder ping c0 -v 2024-08-12 17:06:44.261 [debu] net.wgengine: [v1] using fake (no-op) tun device 2024-08-12 17:06:44.261 [debu] net.wgengine: [v1] using fake (no-op) OS network configurator 2024-08-12 17:06:44.261 [debu] net.wgengine: [v1] using fake (no-op) DNS configurator 2024-08-12 17:06:44.261 [debu] net.wgengine: dns: using dns.noopManager 2024-08-12 17:06:44.262 [debu] net.wgengine: link state: interfaces.State{defaultRoute=en0 ifs={en0:[10.0.0.21/24]} v4=true v6=false} 2024-08-12 17:06:44.262 [debu] net.wgengine: [v1] couldn't create raw v4 disco listener, using regular listener instead: raw disco listening not supported on this OS 2024-08-12 17:06:44.262 [debu] net.wgengine: [v1] couldn't create raw v6 disco listener, using regular listener instead: raw disco listening not supported on this OS 2024-08-12 17:06:44.262 [debu] net.wgengine: magicsock: disco key = d:fb319b0d612d3eb5 2024-08-12 17:06:44.262 [debu] net.wgengine: Creating WireGuard device... 2024-08-12 17:06:44.264 [debu] net.wgengine: Bringing WireGuard device up... 2024-08-12 17:06:44.264 [debu] net.wgengine: wg: [v2] UDP bind has been updated 2024-08-12 17:06:44.264 [debu] net.wgengine: wg: [v2] Interface state was Down, requested Up, now Up ``` The result is frustration for our customers that have to bring Coder engineers into support calls. Today I'm experiencing that frustration as my development environment is much slower than normal. I even have the privileged ability to ping @coadler on Slack that our customers lack. The most common question is "why isn't p2p working" and "what can I do to make p2p work". Can we design our various networking UIs in the product to explain that? Here's `coder ping` today: ``` I ~ coder ping c0 pong from c0 proxied via DERP(Council Bluffs, Iowa) in 73ms pong from c0 proxied via DERP(Council Bluffs, Iowa) in 73ms pong from c0 proxied via DERP(Council Bluffs, Iowa) in 76ms pong from c0 proxied via DERP(Council Bluffs, Iowa) in 73ms ✔ preferred DERP region: 999 (Council Bluffs, Iowa) ✔ sent local data to Coder networking coodinator ✔ received remote agent data from Coder networking coordinator preferred DERP region: 999 (Council Bluffs, Iowa) endpoints: 204.16.241.141:46660, 172.17.0.1:46660, 172.20.0.13:46660 ✔ Wireguard handshake 10s ago ``` One could imagine it explaining that P2P doesn't work because - it's disabled as a deployment setting - both sides of the connection are hard nat - ???