Preflight checklist
Component
Core Engine / Desktop GUI / Configuration
Problem
- Network Congestion During Active Hours: Hydra's multi-connection engine aggressively consumes available bandwidth, which saturates shared home/office networks during working hours or peak gaming/streaming times.
- Manual Intervention Overhead: Users currently have to manually pause downloads or manually tweak global speed limits when starting/stopping work.
- Metered Connection Hazards: When switching to mobile hotspots or metered connections, unconstrained background downloads can rapidly deplete limited data quotas.
Proposed solution
Implement a dynamic Bandwidth & Speed Scheduler that programmatically adjusts download rates, connection limits, and active queues based on time windows and network status.
Key Capabilities
- Configurable Time-Window Rules (Config / CLI):
- Support a timetable configuration in
config.toml (or daemon configuration) specifying time blocks, days of the week, and respective rate limits:
- Normal Speed Limit: Default speed ceiling during general usage.
- Alternative / Off-Peak Speed Limit: Unrestricted or high speeds during off-peak hours (e.g., 12:00 AM – 07:00 AM).
- Work/Strict Limit: Restrictive cap during business hours (e.g., Mon–Fri, 09:00 AM – 06:00 PM: 2 MB/s).
- GUI Weekly Timetable Grid:
- Provide an interactive 7x24 weekly matrix view in Options > Speed / Scheduler (similar to qBittorrent/Transmission) where users can paint hourly slots with:
Full Speed
Alternative Speed Limit
Paused / Queue Only
- Live Rate Limiter Adaptation (Zero Disconnection):
- The underlying token-bucket rate limiter in the core engine should dynamically update its refill capacity upon schedule transitions without terminating active multi-part TCP streams or resetting chunk buffers.
- Metered Network Detection & Guard:
- Detect OS metered connection states (via
NetworkInformation on Windows, NetworkManager metered property on Linux, or SCNetworkReachability flags on macOS) to auto-pause or throttle downloads unless explicitly bypassed.
Alternatives considered
- Static Global Speed Limit: Requires manual switching twice a day.
- External OS-Level Traffic Control (
tc, NetLimiter, pf): Hard to configure, platform-dependent, and outside Hydra's direct control.
Platforms this should cover
Additional context
Proposed Configuration Schema (config.toml)
[speed_limit]
global_download_rate = "0" # 0 = unlimited
[scheduler]
enabled = true
alt_download_rate = "2MB/s"
alt_upload_rate = "500KB/s"
# Active alternative speed windows
[[scheduler.rules]]
days = ["Mon", "Tue", "Wed", "Thu", "Fri"]
start_time = "09:00"
end_time = "18:00"
action = "alt_limit" # "alt_limit" | "pause" | "unlimited"
[[scheduler.rules]]
days = ["Everyday"]
start_time = "00:00"
end_time = "07:00"
action = "unlimited"
Compatibility
Contribution
Preflight checklist
Component
Core Engine / Desktop GUI / Configuration
Problem
Proposed solution
Implement a dynamic Bandwidth & Speed Scheduler that programmatically adjusts download rates, connection limits, and active queues based on time windows and network status.
Key Capabilities
config.toml(or daemon configuration) specifying time blocks, days of the week, and respective rate limits:Full SpeedAlternative Speed LimitPaused / Queue OnlyNetworkInformationon Windows, NetworkManagermeteredproperty on Linux, or SCNetworkReachability flags on macOS) to auto-pause or throttle downloads unless explicitly bypassed.Alternatives considered
tc, NetLimiter, pf): Hard to configure, platform-dependent, and outside Hydra's direct control.Platforms this should cover
libhydra)Additional context
Proposed Configuration Schema (
config.toml)Compatibility
Contribution