Skip to main content

electron/services/monitoring/utils/nativeConnectivity

Native connectivity checking without external dependencies Replaces the ping package entirely with TCP, DNS, and HTTP checks

Remarks

This module provides reliable connectivity checking without requiring elevated privileges or external system utilities. It uses Node.js built-in modules (net, dns, fetch) to perform connectivity tests that are more reliable and cross-platform compatible than ICMP ping.

Key advantages over ping package:

  • No elevated privileges required
  • Better cross-platform consistency
  • More control over timeout/retry logic
  • No shell command security risks
  • Can check specific services (not just ICMP)
  • Built-in HTTP/HTTPS connectivity checks

Interfaces

Functions