28 releases
| new 0.1.27 | Feb 10, 2026 |
|---|---|
| 0.1.26 | Feb 9, 2026 |
| 0.1.20 | Jan 30, 2026 |
#1095 in Network programming
245KB
3K
SLoC
hale
hale is a lightweight, high-precision network connection quality monitor. It answers the critical question: "Is my internet connection OK right now?"
hale uses concurrent TCP probing across six major global networks (Google, AWS, Azure, Cloudflare, Quad9, OpenDNS) to provide an at-a-glance health assessment without requiring root/sudo privileges.
Quick Start
Installation
cargo install hale
Basic Usage
Interactive TUI (default):
hale
Full-screen dashboard for continuous monitoring with real-time status, per-provider history, and 5m/1h connection overviews. Press q, ESC, or Ctrl+C to exit.
CLI mode:
# Quick check
hale --check
# Verbose output with timestamps
hale --check --verbose
# Machine-readable JSON output
hale --check --format json
Exit Codes:
0: Connection is OK1: Connection is Slow or Disconnected
Key Features
- Intelligent Analysis:
- Multi-Provider Probing: Simultaneously monitors Google, AWS, Azure, Cloudflare, Quad9, and OpenDNS
- Majority Voting: Uses a 4/6 threshold to filter out localized network noise or single-provider outages
- High Frequency: 500ms update interval for immediate detection of micro-dropouts
- Historical Visibility:
- Per-provider status history bars
- 5-minute and 1-hour aggregate connection overviews
- Automatic downtime tracking and duration calculation
- Lean & Safe:
- Resource Efficient: Memory footprint < 5MB, CPU usage < 1%
- Zero Configuration: Works out of the box with sensible defaults
- Terminal Safety: Implements panic hooks to ensure your terminal is always restored to its original state
How It Works
Monitoring Targets
Hale monitors the entry points of the world's most critical internet infrastructure:
- Google:
8.8.8.8 - AWS:
s3.amazonaws.com - Azure:
portal.azure.com - Cloudflare:
1.1.1.1 - Quad9:
9.9.9.9 - OpenDNS:
208.67.222.222
Status Thresholds
- OK: Latency < 100ms
- Slow: Latency 100-300ms
- Disconnected: Latency > 300ms or majority (4/6) timeout
Technology Stack
- Language: Rust (2021 Edition)
- Async Runtime:
tokio(v1) for concurrent non-blocking probing - TUI Framework:
ratatuiwithcrosstermbackend - CLI Parsing:
clap(v4) with derive macros
Module Structure
- Monitor: Handles concurrent TCP (port 443) handshake probing
- Analysis: Aggregates raw data and applies majority voting for stability
- UI: Renders the interactive TUI and formatted CLI outputs
- Utils: Provides session logging with automatic downtime calculation
Logging
Hale automatically creates a detailed session log at:
/tmp/hale-{timestamp}.log
This log records every status change and precisely calculates how long each network incident lasted.
Development
Building from Source
# Clone the repository
git clone https://github.com/adamatan/hale.git
cd hale
# Build the release binary
cargo build --release
# The binary is now available at
./target/release/hale
Testing
Hale includes a comprehensive suite of unit tests covering its analysis engine and probing logic.
cargo test
Release Process
This project uses an automated release workflow powered by release-plz.
- Trigger: Pushing to the
mainbranch - Versioning: Determined automatically based on Conventional Commits
fix:-> Patch bumpfeat:-> Minor bumpBREAKING CHANGE:-> Major bump
- Publishing: Automatically publishes to crates.io and creates a GitHub release/tag
License
This project is licensed under the MIT License - see the LICENSE file for details.
Dependencies
~9–39MB
~506K SLoC