Skip to content

@capgo/capacitor-network-diagnostics

Native diagnostics for blocked ports, captive portals, WebSockets, download speed, and packet loss.

@capgo/capacitor-network-diagnostics helps support teams diagnose restricted Wi-Fi, access point, carrier, firewall, captive portal, DNS, and proxy problems from the same native network stack used by the app.

Use it when a user can open the app but cannot reach a specific API, TCP port, WebSocket endpoint, or download URL from a locked-down network.

  • getNetworkStatus - Read the native connection type and platform network flags.
  • testUrl - Check HTTP or HTTPS URL reachability with status code and latency.
  • testPort - Open a native TCP socket to a host and port.
  • testWebSocket - Validate a ws:// or wss:// handshake.
  • testDownloadSpeed - Measure native download throughput from your own test file endpoint.
  • testPacketLoss - Estimate application-level packet loss with repeated TCP or HTTP probes.
  • runDiagnostics - Run a combined diagnostic pass and return a compact issue list.

Raw ICMP ping is not consistently available to App Store and Play Store apps, so packet loss uses repeated TCP or HTTP probes.

MethodDescription
getNetworkStatusRead the current native connection type and platform network flags.
testUrlTest whether an HTTP or HTTPS URL can be reached from native networking.
testPortTest whether a TCP host and port can be opened from native networking.
testWebSocketTest whether a WebSocket URL can complete its native handshake.
testDownloadSpeedMeasure download throughput from a native HTTP request.
testPacketLossEstimate application-level packet loss with repeated TCP or HTTP probes.
runDiagnosticsRun several diagnostics and return a compact issue list.
getPluginVersionReturn the native plugin version marker.

This reference is synced from src/definitions.ts in capacitor-network-diagnostics.