aria2_protocol/lib.rs
1//! # aria2-protocol
2//!
3//! Protocol implementations for the aria2-rust download utility.
4//!
5//! Provides client-side protocol handlers for HTTP/HTTPS, FTP/SFTP, BitTorrent,
6//! Metalink, and SFTP downloads. Each protocol module is feature-gated to allow
7//! minimal builds when only specific protocols are needed.
8//!
9//! ## Modules
10//!
11//! - **[`http`]** — HTTP/HTTPS client built on reqwest/hyper: request construction,
12//! Range header handling, BASIC/Digest authentication, proxy support (HTTP/SOCKS5),
13//! gzip/deflate decompression, Cookie management, chunked transfer decoding,
14//! custom headers, and redirect following.
15//!
16//! - **[`ftp`]** — FTP/SFTP client: control connection (USER/PASS/CWD/SIZE/PASV/EPSV),
17//! passive mode data transfer, anonymous and authenticated login, REST-based resume.
18//!
19//! - **[`bittorrent`]** *(feature: `bittorrent`)* — Full BitTorrent protocol stack:
20//! bencode codec, .torrent parsing, info_hash computation, BT message protocol (10 types),
21//! handshake, Tracker communication (HTTP announce/scrape), DHT network (K-buckets/KRPC),
22//! PEX peer exchange, MSE encryption framework, PeerConnection, choke algorithm,
23//! PiecePicker (RarestFirst/Sequential/Random/EndGame).
24//!
25//! - **[`metalink`]** *(feature: `metalink`)* — Metalink V3/V4 XML parser:
26//! multi-mirror URL priority, hash verification (MD5/SHA1/SHA256/SHA512),
27//! piece checksums, MetaURL torrent detection.
28//!
29//! - **[`sftp`]` *(feature: `sftp`)* — SFTP over SSH2 client: key/password auth,
30//! file operations (stat/read/write/mkdir/rmdir/readdir/symlink), streaming transfer.
31
32pub mod ftp;
33pub mod http;
34
35#[cfg(feature = "bittorrent")]
36pub mod bittorrent;
37
38#[cfg(feature = "metalink")]
39pub mod metalink;
40
41#[cfg(feature = "sftp")]
42pub mod sftp;