Skip to content

HYDRA Logo

HYDRA

A fast, resilient, multi-source file retriever and download engine.

crates.io docs.rs Coverage CI Status License Rust Edition


Overview

HYDRA is a high-performance network file retriever designed for speed, resilience, and adaptability. It dynamically partitions downloads across multiple connections and independent mirror sources, continuously rebalancing work to maximize throughput without stalling on slow peers. It ships as both a wget/curl-compatible CLI and a cross-platform desktop download manager with browser integration.

Hydra Download Manager

Key Features

Engine

  • Multi-Source & Adaptive Concurrency: Saturates high-bandwidth links by dynamically distributing byte ranges across connections and mirrors.
  • Dynamic Range Stealing: Automatically detects laggard connections and redistributes remaining work to faster peers with zero server coordination overhead.
  • Collapse & Stall Detection: Uses two-sided CUSUM and dual-window statistical estimators to swiftly identify degraded connections before traditional timeouts expire.
  • Protocols & Proxies: Supports HTTP/1.1, HTTPS (via rustls with Mozilla roots), FTP (RFC 959 / REST), HTTP CONNECT tunneling, and SOCKS4 / SOCKS4a / SOCKS5 proxies.
  • Integrity & Offline Parity: Per-chunk checksum manifest verification (--emit-manifest, --chunk-digests) and local Reed–Solomon erasure coding for bitrot protection.
  • Constant Memory Footprint: Positioned writes (pwrite) stream data directly to disk, keeping resident memory usage flat regardless of file size.

CLI

  • curl & wget Compatibility: Direct drop-in support for common wget and curl command-line flags and dialect personalities.
  • Interactive Queue Manager: Full-screen terminal UI (TUI) for managing, pausing, resuming, and monitoring queued downloads.
  • Format Sniffing & Smart Sorting: Content-based magic byte inspection for accurate file type detection and optional category-based directory sorting (--sort-by-type).
  • Remote Checksum Lookup: Inspects server-advertised digests (Content-MD5, x-goog-hash, …) and verifies downloads against a target hash.

Desktop GUI

  • Cross-Platform Download Manager: Native desktop app for Windows, macOS, and Linux with a persistent download list, categories, pause/resume, and per-download progress detail.
  • Browser Integration: Extensions for Chrome/Chromium, Edge, Firefox, and Safari hand downloads captured in the browser to the app — over a local WebSocket bridge, with a native-messaging host as fallback that can also launch the app on demand.
  • Queue & Scheduler: Queued downloads with scheduled start/stop times and retry tracking.
  • Desktop Conveniences: System tray with light/dark-aware icons, event sounds, launch-on-startup, and localized UI.

Installation

Quick Install (prebuilt binaries)

macOS / Linux — installs the GUI bundle (GUI + CLI + browser extensions) by default:

curl -fsSL https://raw.githubusercontent.com/ja7ad/hydra/main/install.sh | bash

CLI only:

curl -fsSL https://raw.githubusercontent.com/ja7ad/hydra/main/install.sh | bash -s -- --cli

Windows (PowerShell) — installs the GUI bundle by default:

irm https://raw.githubusercontent.com/ja7ad/hydra/main/install.ps1 | iex

CLI only:

& ([scriptblock]::Create((irm https://raw.githubusercontent.com/ja7ad/hydra/main/install.ps1))) -Cli

The scripts detect your OS and architecture (amd64/arm64), fetch the matching archive from the latest GitHub release, and install it — on Linux and macOS to /usr/local (falling back to ~/.local; override with --prefix DIR), on Windows to %LOCALAPPDATA%\Programs\Hydra. GUI installs also register the browser native-messaging host. Pin a release with --version vX.Y.Z / -Version vX.Y.Z, or download the archives yourself from the releases page.

From Source

Ensure you have Rust (1.80+) installed:

git clone https://github.com/ja7ad/hydra.git
cd hydra
cargo build --release

The compiled binary will be located at target/release/hydra. To build the GUI and native-messaging host as well, run make build.


Uninstall

Quick Uninstall (prebuilt installs)

macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/ja7ad/hydra/main/uninstall.sh | bash

To also delete config, state, and logs:

curl -fsSL https://raw.githubusercontent.com/ja7ad/hydra/main/uninstall.sh | bash -s -- --purge

Windows (PowerShell):

irm https://raw.githubusercontent.com/ja7ad/hydra/main/uninstall.ps1 | iex

To also delete config and state:

& ([scriptblock]::Create((irm https://raw.githubusercontent.com/ja7ad/hydra/main/uninstall.ps1))) -Purge

The scripts remove binaries, extensions, manifests, desktop shortcuts, and startup entries. On macOS, they also remove the bundled app and package receipts. Config and state are kept by default (~/.config/hydra on Linux/macOS, %APPDATA%\hydra on Windows); use --purge / -Purge to delete them.


Usage

Basic Download

# Retrieve a file with automatic concurrency discovery
hydra https://example.com/archive.tar.gz

# Specify output destination
hydra https://example.com/archive.tar.gz -o output.tar.gz

Multi-Connection & Mirror Sources

# Explicit connection count (e.g., 8 connections)
hydra -x 8 https://example.com/largefile.iso

# Fetch across multiple mirror origins serving identical files
hydra https://mirror1.example.org/file.iso https://mirror2.example.org/file.iso

CLI Compatibility (wget / curl Mode)

HYDRA can seamlessly emulate wget or curl flags:

# wget dialect
hydra --compat=wget -c -O myfile.zip https://example.com/file.zip

# curl dialect
hydra --compat=curl -C - -o myfile.zip https://example.com/file.zip

Interactive Queue Manager (TUI)

# Launch interactive terminal UI
hydra interactive

# Add multiple downloads into the queue
hydra interactive https://example.com/file1.iso https://example.com/file2.zip

Remote Checksum Lookup & Verification

# Check remote advertised checksums without downloading the object
hydra checksum https://example.com/release.tar.gz

# Download with target hash verification
hydra --checksum sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 https://example.com/file.tar.gz

Contributing

Contributions are welcome! Please read the Contributing Guide for the project layout, build instructions, pre-submit checks (fmt, clippy, tests), commit conventions, and how licensing applies to each crate. In short:

cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-targets --all-features

Bug reports and feature requests go to the issue tracker; security vulnerabilities should be reported privately via GitHub security advisories.


License

  • The hydra CLI binary is licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later).
  • The hydra-core and hya-net libraries are dual-licensed under MIT or Apache-2.0 (LICENSE-MIT / LICENSE-APACHE).

For more details, see LICENSING.md and THIRD-PARTY-NOTICES.md.

About

A fast, resilient, multi-source file retriever and download engine

Topics

Resources

Contributing

Stars

43 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages