Expand description
§aria2-protocol
Protocol implementations for the aria2-rust download utility.
Provides reusable protocol implementations and protocol-level utilities for HTTP/HTTPS, FTP, SFTP, BitTorrent, and Metalink. HTTP, FTP, SOCKS, proxy URL parsing, URI component encoding, and identity defaults are always available; BitTorrent, Metalink, and SFTP are enabled by their respective crate features. The download engine owns task policy, network routing, and process-wide lifecycle; these modules expose protocol operations without depending on the engine.
§Modules
-
http— Standalone HTTP/HTTPS client built on reqwest, plus reusable request serialization, response parsing, authentication, CONNECT, cookie, content-decoding, redirect, and header-parsing operations. The standaloneHttpClientdoes not configure proxies; the download engine composes proxy and network policy around its task-facing clients. -
ftp— FTP client: control connection (USER/PASS/CWD/SIZE/PASV/EPSV), passive mode data transfer, anonymous and authenticated login, REST-based resume. -
[
bittorrent] (feature:bittorrent) — Full BitTorrent protocol stack: bencode codec, .torrent parsing, info_hash computation, BT message protocol (10 types), handshake, incoming TCP listener and handshake primitives, Tracker communication (HTTP announce/scrape), DHT network (K-buckets/KRPC), PEX peer exchange, MSE encryption framework, andPeerConnection. The engine composes the raw listener with torrent routing, admission, and lifecycle management. -
[
metalink] (feature:metalink) — Metalink V3/V4 XML parser: multi-mirror URL priority, hash verification (MD5/SHA1/SHA256/SHA512), piece checksums, MetaURL torrent detection. -
[
sftp] (feature:sftp) — SFTP over SSH2 client: key/password auth, file operations (stat/read/write/mkdir/rmdir/readdir/symlink), streaming transfer. -
socks— SOCKS4/SOCKS5 CONNECT handshakes over caller-provided streams. Socket creation and target-address policy belong to the caller. -
proxy— Proxy URL parsing, including percent-decoded credentials; it does not resolve hosts or select routes. -
uri— URI component percent-encoding and decoding helpers. -
identity— Default product and peer identity strings for standalone library users. Applications can supply their own identity through the higher-level configuration boundary.
Modules§
- ftp
- http
- identity
- Default identity strings for standalone protocol and core-library users.
- proxy
- socks
- SOCKS4 and SOCKS5 connection handshakes over an injected byte stream.
- uri
- Shared URI component encoding helpers.
Constants§
- DEFAULT_
LPD_ MULTICAST_ ADDRESS - Standard BitTorrent Local Peer Discovery multicast address.
- DEFAULT_
LPD_ PORT - Standard BitTorrent Local Peer Discovery UDP port.
- DEFAULT_
SFTP_ CONNECT_ TIMEOUT_ SECS - Default TCP connection timeout for SFTP’s SSH transport, in seconds.
- DEFAULT_
SFTP_ KEEPALIVE_ INTERVAL_ SECS - Default SSH keepalive interval for SFTP transport, in seconds.
- DEFAULT_
SFTP_ PORT - Default TCP port for SSH/SFTP connections.
- DEFAULT_
SFTP_ READ_ TIMEOUT_ SECS - Default SFTP channel read timeout, in seconds.