rayhunter
rayhunter copied to clipboard
✨ New Feature - telemetry
Telemetry System Implementation
This PR adds an optional telemetry system to Rayhunter.
Features Added
- Anonymous Device Identification: Generates a hash-based device ID with no personally identifiable information
- Configurable Data Collection:
- System statistics (disk usage, memory usage)
- Warning events with timestamps and severity
- Recording information (duration, size, count)
- Privacy-Focused Design:
- Disabled by default, requires explicit opt-in
- No collection of raw network data
- No personal information transmitted
- Web UI Configuration: Settings interface for enabling/disabling and configuring telemetry
- API Authentication: Uses API key for secure data transmission
- Periodic or Manual Transmission: Configurable transmission interval with option for manual triggers
Technical Implementation
- Background worker thread for data collection and transmission
- Non-blocking communication via channels
- Persistent configuration via config file
- Comprehensive error handling with new
TelemetryInitErrorvariant - Full API documentation with rustdoc comments
- Example config for easy setup
Updates to Documentation
- Added README section on telemetry
- Created sample config file with telemetry settings
- Added detailed API documentation
Testing Notes
To test the telemetry system:
- Enable telemetry in the config file
- Set a valid endpoint and API key
- View telemetry status in the web UI settings page
- Trigger warnings to see telemetry capture in action
Telemetry can be easily enabled/disabled via the web UI or by editing the config file.