Expand description
BitTorrent session management: peers, torrents, and piece selection.
Modules§
- alert
- Session alert stream: categories, kinds, and the broadcast surface. Alert/event system for push-based notifications.
- apply
- Transactional
apply_settingsskeleton with phase-ordered rollback (M173 Lane B). Transactionalapply_settingsskeleton with phase-ordered rollback (M173 Lane B, B1). - category_
manager - qBt-compat category registry (M170). qBt-compat category registry (M170).
- disk
- Disk I/O manager: configuration, handles, and statistics.
- disk_
backend - Pluggable disk I/O backend trait and implementations. Pluggable disk I/O backend abstraction.
- extension
- Extension-protocol (BEP 10) plugin surface. Extension plugin interface for custom BEP 10 extensions.
- hash_
pool - Parallel SHA-1/SHA-256 piece-hashing pool. Dedicated thread pool for CPU-bound piece hash verification (M96).
- i2p
- I2P support via the SAM v3.1 bridge protocol.
- notification
- M226: engine-side OS notification dispatcher
(completion + error toasts via
notify-rust/ zbus). M226: engine-side OS notification dispatcher. - resume_
file - Resume file persistence: serialize, deserialize, atomic write, and directory helpers. Resume file persistence: serialize, deserialize, atomic write, and directory helpers.
- save_
path - Save-path token expansion (M173 Lane A — Decision 5). Save-path token expansion (M173 Lane A — Decision 5).
- stats
- Session statistics metric registry and atomic counter array.
- streaming
- Sequential / streaming file read surface.
File streaming —
AsyncRead+AsyncSeekover individual torrent files. - tag_
manager - qBt-compat tag registry (M171). qBt-compat tag registry (M171).
- transport
- Network transport abstraction layer.
- url_
guard - SSRF-safe URL validation + redirect policy for user-supplied URLs. URL security validation — SSRF mitigation, IDNA rejection, HTTPS enforcement.
- verify_
before_ download - Verify-Before-Download: fast file-size pre-scan (M205). Verify-Before-Download: fast file-size pre-scan (M205).
- watched_
folder - M226: engine-side watched-folder auto-add dispatcher
(notify-debouncer-full →
add_torrent). M226 Step 6: engine-side watched-folder subsystem.
Structs§
- AddTorrent
Params - Unified parameters for
SessionHandle::add_torrent(M170). - Alert
- A timestamped event from the session or a torrent.
- Alert
Category - Bitmask categories for filtering alerts.
- Alert
Stream - A filtered view of the alert broadcast channel.
- Applied
Settings - Classification of settings-patch fields into “took effect immediately” versus “requires session restart to apply”.
- BanConfig
- Configuration for smart banning behaviour.
- Boxed
Stream - A type-erased bidirectional async stream.
- Category
Metadata - Metadata for a single category.
- Category
Registry - In-memory category store, persisted to a single TOML file.
- Debug
Dispatch State - Dispatch-level diagnostic counters (session-wide + per-torrent).
- Debug
Peer State - Per-peer debug state for diagnosing throughput issues.
- Debug
State - Top-level debug state snapshot for all torrents in the session.
- Debug
Torrent State - Per-torrent debug state including dispatch counters and peer details.
- DhtNode
Entry - A DHT bootstrap node entry for session persistence.
- Disabled
Disk Io - No-op disk I/O backend for network throughput benchmarking.
- Disk
Config - Configuration for the disk I/O subsystem.
- Disk
Handle - Per-torrent handle for async disk I/O.
- Disk
IoStats - Aggregate I/O statistics for a disk backend.
- Disk
JobFlags - Hint flags for disk I/O operations.
- Disk
Manager Handle - Session-level handle for managing the disk subsystem.
- Disk
Stats - Disk I/O performance counters.
- File
Info - Info about a file within a torrent.
- File
Status - Status of a single file within a torrent.
- File
Stream - Async reader/seeker over a single file within a torrent.
- Hash
Pool - A thread pool dedicated to CPU-bound piece hash verification.
- Hash
Result - Result of a hash verification.
- I2pDestination
- An I2P destination address (~516 bytes, Base64-encoded for display/storage).
- IpFilter
- IP address filter supporting both IPv4 and IPv6 ranges.
- Network
Factory - Factory for creating TCP listeners and outbound connections.
- Partial
Piece Info - In-flight piece download status for the download queue.
- Peer
Info - Per-peer details exported for client UI introspection.
- Peer
Pipeline Snapshot - Point-in-time snapshot of the per-torrent peer-pipeline counters.
- Peer
Strike Entry - A peer strike entry for session persistence.
- Phase
- A single phase of the transactional apply pipeline.
- Port
Filter - Port range filter.
- Proxy
Config - Proxy connection settings.
- QbtCompat
Settings - qBittorrent
WebUIv2 compatibility layer configuration. - Reconfig
Guard - RAII guard returned by
ReconfigInFlight::try_lock. Releases the slot when dropped. - Reconfig
InFlight - In-flight reconfig guard. Used by
SessionActorto detect concurrentsetPreferencescalls and reject the second one withApplyError::ConcurrentReconfig. - Resume
Load Result - Result of loading resume state from disk (M161 Phase 4).
- Session
Counters - Atomic counter array shared between session and torrent actors.
- Session
Handle - Cloneable handle for interacting with a running session.
- Session
Snapshot - Lock-free read-model published by the [
SessionActor] (M245 A1). - Session
State - Persisted session state containing a DHT node cache and torrent resume data.
- Session
Stats - Aggregate statistics for the whole session.
- Session
Stats Metric - Static metadata for a single session metric.
- Settings
- Unified session settings (replaces
SessionConfig). - TagRegistry
- In-memory tag store, persisted to a single TOML file.
- Torrent
Config - Configurable parameters for a torrent session.
- Torrent
Flags - Bitflag convenience wrapper for common torrent state flags.
- Torrent
Handle - Cloneable handle for interacting with a running torrent.
- Torrent
Info - Metadata about a torrent (available after metadata is fetched).
- Torrent
Save Path Context - Per-torrent context used to expand
{tracker}/{yyyy}/{mm}/{content_type}tokens. - Torrent
Stats - Aggregate statistics for a torrent.
- Torrent
Summary - Lightweight summary of a torrent for the HTTP API.
- Tracker
Info - Public info about a single tracker.
- WebSeed
Stats - Per-URL stats for a single web-seed source, surfaced to the qBt v2
/api/v2/torrents/webseedsendpoint and the GUI’s HTTP Sources tab.
Enums§
- AddSource
- Source for a torrent add (M170).
- Alert
Kind - The specific event that occurred.
- Apply
Error - Errors that can be returned by the transactional
apply_settingspath. - Category
Error - Errors from category registry operations.
- Choking
Algorithm - Top-level choking algorithm variant.
- Error
- Errors that can occur during session operations.
- Expand
Save Path Error - Errors from save-path expansion.
- File
Mode - Whether a file in a torrent is open and its I/O access mode.
- HashJob
- Job submitted to the hash pool.
- I2pDestination
Error - Error type for I2P destination parsing.
- IpFilter
Error - Errors from parsing IP filter files.
- MaxRatio
Action - M171: Action taken when a torrent’s seed ratio reaches its configured limit.
- Metric
Kind - Whether a metric is a monotonically increasing counter or a point-in-time gauge.
- Mixed
Mode Algorithm - Mixed-mode bandwidth allocation algorithm for TCP/uTP coexistence.
- Peer
Source - Origin of a peer address.
- Proxy
Type - Supported proxy protocols (matching libtorrent).
- QbtCredential
Migration - Outcome of a legacy-plaintext migration pass (M172a A3 / C2).
- QbtMigration
Error - Errors raised by
migrate_qbt_credentials. - Resume
File Error - Errors that can occur during resume file operations.
- Seed
Choking Algorithm - Choking algorithm used when we are seeding.
- Settings
Error - Validation failure produced by
Settings::validate. - Simple
Content Type - Coarse content-type classification surfaced as
{content_type}. - TagError
- Errors raised by the tag registry.
- Torrent
State - Current state of a torrent.
- Tracker
Status - Public tracker status (simplified view of internal
TrackerState). - WebSeed
State - Coarse state of a single web-seed source.
Constants§
- DEFAULT_
ADMINADMIN_ HASH - Argon2id PHC hash of the default “adminadmin” password (M172a A3).
- NUM_
METRICS - Total number of metrics tracked by the session.
Traits§
- Disk
IoBackend - Trait for pluggable disk I/O backends.
- Extension
Plugin - A custom BEP 10 extension message handler.
- Transport
Listener - An object-safe listener that accepts inbound connections.
Functions§
- apply_
phases_ with_ rollback - Run a sequence of phases in order. On the first failure, roll back all already-applied phases in REVERSE order, then return the failure.
- build_
wanted_ pieces - Build a bitfield marking which pieces are wanted based on file priorities.
- default_
resume_ dir - Return the default resume directory.
- expand_
save_ path_ for_ category - Convenience wrapper that pulls the
save_pathtemplate out of aCategoryRegistrythen delegates toexpand_save_path_template. - expand_
save_ path_ template - Expand the five locked tokens inside
templateagainstctx. - hash_
qbt_ password - Hash
plaintextwith OWASP-recommended argon2id parameters and return the PHC-format encoded string (M172a). - migrate_
qbt_ credentials - One-shot legacy-plaintext → argon2id migration for
QbtCompatSettings. - parse_
dat - Parse an eMule
.datformat blocklist. - parse_
p2p - Parse a P2P plaintext format blocklist.
- resolve_
category_ registry_ path - Resolve the category registry path from settings, falling back to the standard XDG/platform location when no override is configured.
- resolve_
tag_ registry_ path - Resolve the filesystem path at which the tag registry is stored. If
explicitisSome, use it verbatim; otherwise fall back to$XDG_CONFIG_HOME/irontide/tags.toml(viadirectories::ProjectDirs). Final fallback (e.g. if the XDG dirs cannot be resolved) is the relative path./.irontide/tags.toml. - session_
stats_ metrics - Return static metadata for all session metrics.
- validate_
resume_ bitfield - Returns
trueif thepiecesbitfield has the correct length fornum_piecespieces (i.e.ceil(num_pieces / 8)bytes).
Type Aliases§
- Result
- Convenience alias for
Result<T, Error>. - Storage
Factory - Type alias for a factory that creates per-torrent storage.