@capgo/capacitor-network-diagnostics
Native diagnostics for blocked ports, captive portals, WebSockets, download speed, and packet loss.
Overview
Section titled “Overview”@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.
Core Capabilities
Section titled “Core Capabilities”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 aws://orwss://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.
Public API
Section titled “Public API”| Method | Description |
|---|---|
getNetworkStatus | Read the current native connection type and platform network flags. |
testUrl | Test whether an HTTP or HTTPS URL can be reached from native networking. |
testPort | Test whether a TCP host and port can be opened from native networking. |
testWebSocket | Test whether a WebSocket URL can complete its native handshake. |
testDownloadSpeed | Measure download throughput from a native HTTP request. |
testPacketLoss | Estimate application-level packet loss with repeated TCP or HTTP probes. |
runDiagnostics | Run several diagnostics and return a compact issue list. |
getPluginVersion | Return the native plugin version marker. |
Source Of Truth
Section titled “Source Of Truth”This reference is synced from src/definitions.ts in capacitor-network-diagnostics.