Skip to main content

Connection Diagnostics

This guide explains how to observe active connections and verify peer connectivity using Fungi CLI.

Prerequisite: fungi daemon must be running.

Need binaries first? Start at Install Fungi.

Why This Matters

When file transfer or tunneling behaves unexpectedly, these commands help you quickly answer:

  • Is the peer currently connected?
  • Are streams being created on expected protocols?
  • Is latency stable across active links?

Commands

Fungi provides two diagnostics entry points:

  • fungi connection (alias: fungi conn) for connection and stream snapshots
  • fungi ping <peer_id> for continuous RTT checks on active links

Inspect Active Connections

Show an overview of active connections:

fungi conn overview

Filter by peer:

fungi conn overview --peer-id 16Uiu2HAmXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Filter by protocol:

fungi conn overview --protocol-name /fungi/tunnel/8080/1.0.0

Use verbose output:

fungi conn overview --verbose

Inspect Active Streams

List active streams:

fungi conn streams

Filter options are the same as overview:

fungi conn streams --peer-id 16Uiu2HAmXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
fungi conn streams --protocol-name /fungi/tunnel/8080/1.0.0
fungi conn streams --verbose

Inspect Relay Status

List configured relay endpoints and their current health:

fungi conn relay-status

In relay status output, TCP endpoints should be the stable reservation/circuit carriers. UDP/QUIC endpoints may appear without a relay listener because Fungi uses them only as observer endpoints for UDP address refresh before hole punching.

Continuous Peer Ping

Run continuous ping on all active connections to a peer:

fungi ping 16Uiu2HAmXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Set custom interval (milliseconds):

fungi ping 16Uiu2HAmXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --interval-ms 1000

Show detailed output:

fungi ping 16Uiu2HAmXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --verbose

Stop with Ctrl+C.

Practical Troubleshooting Flow

  1. Run fungi conn overview to confirm the peer has active connections.
  2. Run fungi conn streams to verify stream activity on expected protocols.
  3. Run fungi ping <peer_id> to monitor RTT and check for intermittent instability.
  4. If there are no active connections, verify allowed peers and relay/network settings in your config.