Skip to main content

Settings

Struct Settings 

Source
pub struct Settings {
Show 191 fields pub listen_port: u16, pub randomize_port_on_startup: bool, pub download_dir: PathBuf, pub max_torrents: usize, pub resume_data_dir: Option<PathBuf>, pub save_resume_interval_secs: u64, pub enable_dht: bool, pub enable_pex: bool, pub enable_lsd: bool, pub enable_fast_extension: bool, pub enable_utp: bool, pub enable_upnp: bool, pub enable_natpmp: bool, pub enable_ipv6: bool, pub enable_web_seed: bool, pub enable_holepunch: bool, pub enable_bep40_eviction: bool, pub enable_diagnostic_counters: bool, pub encryption_mode: EncryptionMode, pub anonymous_mode: bool, pub external_ip: Option<IpAddr>, pub seed_ratio_limit: Option<f64>, pub seed_time_limit_secs: Option<u64>, pub inactive_seed_time_limit_secs: Option<u64>, pub max_ratio_action: MaxRatioAction, pub create_subfolder: bool, pub auto_manage_torrents: bool, pub queueing_enabled: bool, pub default_super_seeding: bool, pub default_share_mode: bool, pub upload_only_announce: bool, pub upload_rate_limit: u64, pub download_rate_limit: u64, pub tcp_upload_rate_limit: u64, pub tcp_download_rate_limit: u64, pub utp_upload_rate_limit: u64, pub utp_download_rate_limit: u64, pub auto_upload_slots: bool, pub auto_upload_slots_min: usize, pub auto_upload_slots_max: usize, pub max_upload_slots_global: i32, pub max_upload_slots_per_torrent: i32, pub max_connections_global: i32, pub max_uploads_per_torrent: i32, pub alt_download_rate_limit: u64, pub alt_upload_rate_limit: u64, pub alt_speed_enabled: bool, pub alt_speed_schedule_enabled: bool, pub alt_speed_schedule_from: u16, pub alt_speed_schedule_to: u16, pub alt_speed_schedule_days: u8, pub rate_limit_includes_overhead: bool, pub rate_limit_utp: bool, pub rate_limit_lan: bool, pub mixed_mode_algorithm: MixedModeAlgorithm, pub active_downloads: i32, pub active_seeds: i32, pub active_limit: i32, pub active_checking: i32, pub dont_count_slow_torrents: bool, pub inactive_down_rate: u64, pub inactive_up_rate: u64, pub auto_manage_interval: u64, pub auto_manage_startup: u64, pub auto_manage_prefer_seeds: bool, pub queue_rate_ewma_alpha: f64, pub seed_queue_min_active_secs: u64, pub alert_mask: AlertCategory, pub alert_channel_size: usize, pub smart_ban_max_failures: u32, pub smart_ban_parole: bool, pub disk_io_threads: usize, pub max_blocking_threads: usize, pub storage_mode: StorageMode, pub preallocate_mode: Option<PreallocateMode>, pub disk_cache_size: usize, pub disk_write_cache_ratio: f32, pub disk_channel_capacity: usize, pub buffer_pool_capacity: usize, pub enable_mlock: bool, pub io_uring_sq_depth: u32, pub io_uring_direct_io: bool, pub filesystem_direct_io: bool, pub io_uring_batch_threshold: usize, pub iocp_concurrent_threads: u32, pub iocp_direct_io: bool, pub hashing_threads: usize, pub max_request_queue_depth: usize, pub initial_queue_depth: usize, pub request_queue_time: f64, pub block_request_timeout_secs: u32, pub max_concurrent_stream_reads: usize, pub auto_sequential: bool, pub strict_end_game: bool, pub max_web_seeds: usize, pub web_seed_retry_base_secs: u64, pub web_seed_retry_factor: u64, pub web_seed_retry_cap_secs: u64, pub web_seed_max_failures: u32, pub initial_picker_threshold: u32, pub whole_pieces_threshold: u32, pub snub_timeout_secs: u32, pub readahead_pieces: u32, pub streaming_timeout_escalation: bool, pub steal_threshold_ratio: f64, pub use_block_stealing: bool, pub steal_stale_piece_secs: u64, pub steal_threshold_endgame: f64, pub fixed_pipeline_depth: usize, pub piece_extent_affinity: bool, pub suggest_mode: bool, pub max_suggest_pieces: usize, pub predictive_piece_announce_ms: u64, pub proxy: ProxyConfig, pub force_proxy: bool, pub ip_filter_enabled: bool, pub ip_filter_path: String, pub ip_filter_auto_refresh: bool, pub apply_ip_filter_to_trackers: bool, pub dht_queries_per_second: usize, pub dht_query_timeout_secs: u64, pub dht_enforce_node_id: bool, pub dht_restrict_routing_ips: bool, pub dht_max_items: usize, pub dht_item_lifetime_secs: u64, pub dht_sample_infohashes_interval: u64, pub dht_read_only: bool, pub upnp_lease_duration: u32, pub natpmp_lifetime: u32, pub utp_max_connections: usize, pub enable_i2p: bool, pub i2p_hostname: String, pub i2p_port: u16, pub i2p_inbound_quantity: u8, pub i2p_outbound_quantity: u8, pub i2p_inbound_length: u8, pub i2p_outbound_length: u8, pub allow_i2p_mixed: bool, pub ssl_listen_port: u16, pub ssl_cert_path: Option<PathBuf>, pub ssl_key_path: Option<PathBuf>, pub seed_choking_algorithm: SeedChokingAlgorithm, pub choking_algorithm: ChokingAlgorithm, pub max_peers_per_torrent: usize, pub pass0_grace_secs: u64, pub proactive_evictions_per_minute_limit: u32, pub eviction_ban_duration_secs: u64, pub eviction_ban_set_cap: usize, pub peer_read_timeout_secs: u64, pub peer_write_timeout_secs: u64, pub data_contribution_timeout_secs: u64, pub choke_rotation_max_evictions: u32, pub max_concurrent_connects: u16, pub connect_soft_timeout: u64, pub dispatch_backlog_cap: usize, pub event_backlog_cap: usize, pub use_actor_dispatch: bool, pub web_seed_progress_throttle_ms: u64, pub ssrf_mitigation: bool, pub allow_idna: bool, pub validate_https_trackers: bool, pub max_metadata_size: u64, pub max_message_size: usize, pub max_piece_length: u64, pub max_outstanding_requests: usize, pub max_in_flight_pieces: usize, pub peer_connect_timeout: u64, pub peer_dscp: u8, pub stats_report_interval: u64, pub runtime_worker_threads: usize, pub pin_cores: bool, pub lock_warn_threshold_ms: u64, pub dht_saved_nodes: Vec<String>, pub dht_node_id: Option<Id20>, pub qbt_compat: QbtCompatSettings, pub category_registry_path: Option<PathBuf>, pub tag_registry_path: Option<PathBuf>, pub notify_on_complete: bool, pub notify_on_error: bool, pub on_complete_program: Option<PathBuf>, pub use_incomplete_dir: bool, pub incomplete_dir: Option<PathBuf>, pub default_skip_hash_check: bool, pub incomplete_extension_enabled: bool, pub watched_folder: Option<PathBuf>, pub delete_torrent_after_add: bool, pub move_completed_enabled: bool, pub move_completed_to: Option<PathBuf>, pub web_ui_https_enabled: bool, pub network_interface: Option<String>, pub default_add_paused: bool,
}
Expand description

Unified session settings (replaces SessionConfig).

All 56 configurable fields in a single strongly-typed struct. Supports presets via factory functions and runtime mutation via SessionHandle::apply_settings().

Fields§

§listen_port: u16

TCP listen port for incoming peer connections (default: 42020).

§randomize_port_on_startup: bool

Randomize the listen port each time the session starts. Default: false.

§download_dir: PathBuf

Default download directory for new torrents (default: “.”).

§max_torrents: usize

Maximum number of concurrent torrents (default: 100).

§resume_data_dir: Option<PathBuf>

Directory for fast-resume data files. If None, resume data is not persisted.

§save_resume_interval_secs: u64

Interval in seconds between periodic resume file saves (0 = disabled). Default: 300 (5 minutes).

§enable_dht: bool

Enable Kademlia DHT peer discovery (BEP 5). Default: true.

§enable_pex: bool

Enable Peer Exchange (BEP 11). Default: true.

§enable_lsd: bool

Enable Local Service Discovery via multicast (BEP 14). Default: true.

§enable_fast_extension: bool

Enable BEP 6 Fast Extension (AllowedFast, HaveAll, HaveNone, Reject, SuggestPiece). Default: true.

§enable_utp: bool

Enable uTP (BEP 29) micro transport protocol. When enabled, outbound connections try uTP first with a 5-second timeout before falling back to TCP. Default: true.

§enable_upnp: bool

Enable UPnP IGD port mapping (last resort after PCP and NAT-PMP). Default: true.

§enable_natpmp: bool

Enable NAT-PMP (RFC 6886) and PCP (RFC 6887) port mapping. PCP is tried first, then NAT-PMP as fallback. Default: true.

§enable_ipv6: bool

Enable IPv6 dual-stack support (BEP 7, 24). Binds listeners on both IPv4 and IPv6, starts a second DHT instance, and processes IPv6 peers in PEX and tracker responses. Default: true.

§enable_web_seed: bool

Enable HTTP/web seeding (BEP 19 GetRight, BEP 17 Hoffman). Torrents with url-list or httpseeds download pieces from HTTP servers alongside peer-to-peer transfers. Default: true.

§enable_holepunch: bool

Enable BEP 55 holepunch extension for NAT traversal. Advertises ut_holepunch in the extension handshake and can act as initiator, relay, or target for holepunch connections. Default: true.

§enable_bep40_eviction: bool

Enable BEP 40 canonical peer priority for connection eviction. When at capacity, incoming peers with higher deterministic priority can displace lower-priority ones. Default: true.

§enable_diagnostic_counters: bool

Enable diagnostic counters (dispatch timing, backpressure high-water, peer unchoke/choke/lifetime telemetry). Default: false — enable for benchmarking or troubleshooting via --diagnostics or config.

§encryption_mode: EncryptionMode

Connection encryption mode (MSE/PE). Default: Disabled.

§anonymous_mode: bool

Suppress identifying information (client version in BEP 10 handshake) and disable DHT, LSD, UPnP, and NAT-PMP. Default: false.

§external_ip: Option<IpAddr>

Manually configured external IP for BEP 40 peer priority. If not set, discovered automatically via NAT traversal.

§seed_ratio_limit: Option<f64>

Stop seeding when this upload/download ratio is reached. None = unlimited.

§seed_time_limit_secs: Option<u64>

M171: Stop seeding after this many cumulative seeding seconds. None = no limit. Mirrors qBt’s “Maximum seeding time” preference, which is exposed in minutes on the wire but stored here in seconds to match the other duration-typed fields.

§inactive_seed_time_limit_secs: Option<u64>

M171: Stop seeding after this many seconds of inactivity while in the Seeding state (no outgoing Piece data). None = no limit. Mirrors qBt’s “Maximum inactive seeding time” preference.

§max_ratio_action: MaxRatioAction

M171: What to do when seed_ratio_limit is reached. Mirrors qBt’s max_ratio_act wire enum. Default: Pause.

§create_subfolder: bool

M171: Create a subfolder named after the torrent when adding a multi-file torrent. Mirrors qBt’s create_subfolder_enabled. Default: true (qBt factory default).

§auto_manage_torrents: bool

M171: Automatically manage torrent resources via the queueing subsystem (start/stop/recheck order). Mirrors qBt’s auto_tmm_enabled. Default: false.

§queueing_enabled: bool

M171: Enable the download/upload queueing subsystem. When false, no queueing is applied and torrents run concurrently up to per-torrent limits. Mirrors qBt’s queueing_enabled. Default: false.

§default_super_seeding: bool

Enable BEP 16 super seeding for new torrents. Reveals pieces one-per-peer to maximize piece diversity across the swarm. Default: false.

§default_share_mode: bool

Default share mode for new torrents. When true, torrents relay pieces in memory without writing to disk. Requires fast extension (BEP 6).

§upload_only_announce: bool

Advertise upload-only status via extension handshake when a torrent transitions to seeding (BEP 21). Default: true.

§upload_rate_limit: u64

Global upload rate limit in bytes/sec (0 = unlimited).

§download_rate_limit: u64

Global download rate limit in bytes/sec (0 = unlimited).

§tcp_upload_rate_limit: u64

TCP upload rate limit in bytes/sec (0 = unlimited).

§tcp_download_rate_limit: u64

TCP download rate limit in bytes/sec (0 = unlimited).

§utp_upload_rate_limit: u64

uTP upload rate limit in bytes/sec (0 = unlimited).

§utp_download_rate_limit: u64

uTP download rate limit in bytes/sec (0 = unlimited).

§auto_upload_slots: bool

Automatically adjust the number of upload slots based on bandwidth. Default: true.

§auto_upload_slots_min: usize

Minimum number of automatic upload slots (default: 2).

§auto_upload_slots_max: usize

Maximum number of automatic upload slots (default: 20).

§max_upload_slots_global: i32

Maximum upload slots across all torrents (-1 = unlimited). Default: -1.

§max_upload_slots_per_torrent: i32

Maximum upload slots per torrent. Default: 4.

§max_connections_global: i32

Maximum peer connections across all torrents (-1 = unlimited). Default: -1.

§max_uploads_per_torrent: i32

Maximum unchoked upload slots per torrent (-1 = unlimited). Default: -1. M224: qBt wire max_uploads_per_torrent. -1 is unlimited; n >= 1 caps the choker’s unchoke set; 0 is explicitly rejected by Settings::validate (choking every peer is almost certainly a wire-format mistake, not user intent).

§alt_download_rate_limit: u64

Alternative download rate limit in bytes/sec (0 = unlimited).

§alt_upload_rate_limit: u64

Alternative upload rate limit in bytes/sec (0 = unlimited).

§alt_speed_enabled: bool

Whether alternative speed limits are currently active. Default: false.

§alt_speed_schedule_enabled: bool

Whether the alternative speed schedule is enabled. Default: false.

§alt_speed_schedule_from: u16

Schedule start time in minutes-of-day (0-1439). Default: 0.

§alt_speed_schedule_to: u16

Schedule end time in minutes-of-day (0-1439). Default: 0.

§alt_speed_schedule_days: u8

Schedule active days as a bitmask (bit 0 = Mon .. bit 6 = Sun). Default: 0.

§rate_limit_includes_overhead: bool

Include protocol overhead in rate limit calculations. Default: true.

§rate_limit_utp: bool

Apply rate limits to uTP connections. Default: true.

§rate_limit_lan: bool

Apply rate limits to LAN connections. Default: false.

§mixed_mode_algorithm: MixedModeAlgorithm

Mixed-mode TCP/uTP bandwidth allocation algorithm.

§active_downloads: i32

Maximum concurrent auto-managed downloading torrents (-1 = unlimited, default: 3).

§active_seeds: i32

Maximum concurrent auto-managed seeding torrents (-1 = unlimited, default: 5).

§active_limit: i32

Hard cap on all active auto-managed torrents (-1 = unlimited, default: 500).

§active_checking: i32

Maximum concurrent hash-check operations (default: 1).

§dont_count_slow_torrents: bool

Exempt inactive torrents from download/seed limits. A torrent is inactive if its rate is below inactive_down_rate / inactive_up_rate. Default: true.

§inactive_down_rate: u64

Download rate threshold (bytes/sec) below which a torrent is considered inactive for queue management purposes (default: 2048).

§inactive_up_rate: u64

Upload rate threshold (bytes/sec) below which a torrent is considered inactive for queue management purposes (default: 2048).

§auto_manage_interval: u64

Interval in seconds between queue evaluations (default: 30).

§auto_manage_startup: u64

Grace period in seconds where a torrent is considered active regardless of speed after being started (default: 60).

§auto_manage_prefer_seeds: bool

Allocate seeding slots before download slots. Default: false.

§queue_rate_ewma_alpha: f64

EWMA smoothing factor for queue rate classification (0.0–1.0). 0.0 = pure history (never adapts), 1.0 = no smoothing (raw rate). Default: 0.3.

§seed_queue_min_active_secs: u64

Anti-flap grace period for seeding torrents, in seconds. Seeding torrents are exempt from queue-pause for this duration after starting (default: 1800 = 30 minutes, matching libtorrent).

§alert_mask: AlertCategory

Bitmask of alert categories to receive (default: ALL).

§alert_channel_size: usize

Capacity of the alert broadcast channel (default: 1024).

§smart_ban_max_failures: u32

Number of hash-failure involvements before a peer is auto-banned. Lower values ban faster but risk false positives (default: 3).

§smart_ban_parole: bool

Enable parole mode: re-download a failed piece from a single uninvolved peer to definitively attribute fault before striking. Default: true.

§disk_io_threads: usize

Number of concurrent disk I/O threads (default: 4).

§max_blocking_threads: usize

Maximum number of concurrent blocking I/O operations dispatched via block_in_place. Defaults to the number of available CPU cores.

§storage_mode: StorageMode

Storage allocation mode: Auto, FullPreallocate, or SparseFile (default: Auto).

§preallocate_mode: Option<PreallocateMode>

Override pre-allocation strategy (None/Sparse/Full). When None (default), derived from storage_mode: Full → PreallocateMode::Full, else → PreallocateMode::None.

§disk_cache_size: usize

Total ARC disk cache size in bytes (default: 16 MiB, minimum: 1 MiB).

§disk_write_cache_ratio: f32

Fraction of disk cache reserved for write buffering (0.0–1.0, default: 0.5).

§disk_channel_capacity: usize

Capacity of the async disk I/O command channel (default: 512).

§buffer_pool_capacity: usize

Unified buffer pool capacity in bytes (default: 64 MiB). Replaces disk_cache_size when set. Covers both write buffering and read cache.

§enable_mlock: bool

Lock cached piece data in physical memory (default: true on Unix). Prevents the OS from swapping out hot cache entries. Silently ignored if RLIMIT_MEMLOCK is exceeded.

§io_uring_sq_depth: u32

io_uring submission queue depth (number of SQEs). Only used when storage_mode is IoUring. Default: 256.

§io_uring_direct_io: bool

Enable O_DIRECT for io_uring writes, bypassing the kernel page cache. Unaligned writes fall back to regular pwritev. Default: false.

§filesystem_direct_io: bool

Enable direct I/O for filesystem storage (bypasses kernel page cache). Linux/FreeBSD: O_DIRECT, macOS: F_NOCACHE. Windows: use --iocp with --direct-io. Default: false.

§io_uring_batch_threshold: usize

Minimum number of file segments to batch before using io_uring. Below this threshold, pwritev may be cheaper. Default: 4.

§iocp_concurrent_threads: u32

IOCP concurrent thread count (0 = system default). Only used when storage_mode is Iocp. Default: 0.

§iocp_direct_io: bool

Enable FILE_FLAG_NO_BUFFERING for IOCP I/O, bypassing the OS page cache. Requires sector-aligned writes. Default: false.

§hashing_threads: usize

Number of concurrent piece hash verification threads (default: 2).

§max_request_queue_depth: usize

Maximum per-peer request queue depth (default: 250).

§initial_queue_depth: usize

Initial per-peer request queue depth (default: 128). Higher values let peers reach full throughput faster by skipping slow-start ramp-up.

§request_queue_time: f64

Request queue time multiplier in seconds (default: 3.0).

Deprecated: This field is retained for backward compatibility with existing config files. The pipeline now uses a fixed-depth model where queue depth equals initial_queue_depth for the lifetime of the connection; this value is no longer used in depth computation.

§block_request_timeout_secs: u32

Block request timeout in seconds before the request is considered lost and re-issued (default: 60).

§max_concurrent_stream_reads: usize

Maximum concurrent FileStream readers. Controls how many simultaneous file-streaming reads can proceed (default: 8).

§auto_sequential: bool

Automatically switch to sequential piece picking when too many partial pieces accumulate. Uses hysteresis (1.6x activate / 1.3x deactivate).

§strict_end_game: bool

In end-game mode, cancel duplicate requests when a piece completes. When false, both copies download — wastes bandwidth but finishes faster on unreliable peers. Default: true.

§max_web_seeds: usize

Maximum concurrent web seed connections per torrent (default: 4).

§web_seed_retry_base_secs: u64

M186: Base delay (seconds) for web seed exponential backoff. Default: 10.

§web_seed_retry_factor: u64

M186: Multiplier for web seed exponential backoff. Default: 6.

§web_seed_retry_cap_secs: u64

M186: Maximum backoff (seconds) for web seed retry. Default: 3600.

§web_seed_max_failures: u32

M186: Consecutive failures before permanently banning a web seed. Default: 10.

§initial_picker_threshold: u32

Completed piece count below which the picker uses random selection to promote piece diversity in the swarm. Default: 4.

§whole_pieces_threshold: u32

Seconds to download a piece — if a peer is faster, it gets exclusive assignment (no block splitting). Default: 20.

§snub_timeout_secs: u32

Seconds without data from a peer before marking it as snubbed. Snubbed peers get queue depth clamped to 1. Default: 60.

§readahead_pieces: u32

Number of pieces ahead of the streaming cursor to prioritize (default: 8).

§streaming_timeout_escalation: bool

Escalate streaming piece requests that exceed the mean RTT. Default: true.

§steal_threshold_ratio: f64

Steal blocks from peers this many times slower than the requesting peer (default: 10.0). Set to 0.0 to disable stealing.

§use_block_stealing: bool

Enable per-block stealing: fast peers can steal individual unrequested blocks from pieces reserved by slower peers (default: true).

§steal_stale_piece_secs: u64

Seconds between steal-queue population scans. Every N seconds, all in-flight pieces are pushed into the steal queue so fast peers can steal blocks mid-download (not just at endgame). 0 = disabled. Default: 2.

§steal_threshold_endgame: f64

M149: Steal threshold multiplier when >90% complete (endgame). Pieces taking longer than swarm_avg * this value are stolen. Default: 3.0.

§fixed_pipeline_depth: usize

Fixed per-peer pipeline depth (number of concurrent requests per peer). Replaces the old AIMD dynamic depth system. rqbit uses a fixed Semaphore(128) per peer — simpler and faster. This setting allows benchmarking different fixed depths. Default: 128.

§piece_extent_affinity: bool

Prefer pieces adjacent to those already downloaded for improved sequential disk access patterns (4 MiB extent groups). Default: true.

§suggest_mode: bool

Enable BEP 6 SuggestPiece: suggest newly verified pieces to peers that Send SuggestPiece messages for cached pieces so peers can request what they don’t have them, improving piece diversity in the swarm. Default: true.

§max_suggest_pieces: usize

Maximum SuggestPiece messages per peer to avoid flooding (default: 10).

§predictive_piece_announce_ms: u64

Predictive piece announce delay in milliseconds. When > 0, a Have message is sent before hash verification completes, reducing piece availability latency at the cost of a possible false announce. Default: 0 (disabled).

§proxy: ProxyConfig

Proxy configuration for peer and tracker connections. Default: no proxy.

§force_proxy: bool

Force all connections through the configured proxy. Disables listen sockets, UPnP, NAT-PMP, DHT, and LSD. Default: false.

§ip_filter_enabled: bool

Enable the IP filter (blocklist). Default: false.

§ip_filter_path: String

Path to the IP filter file (e.g. ipfilter.dat). Default: empty.

§ip_filter_auto_refresh: bool

Automatically refresh the IP filter when the file changes. Default: false.

§apply_ip_filter_to_trackers: bool

Check tracker IP addresses against the IP filter. When false, trackers are exempt from IP filtering. Default: true.

§dht_queries_per_second: usize

Maximum DHT queries per second to control network traffic (default: 50).

§dht_query_timeout_secs: u64

Timeout in seconds for a single DHT query before it is abandoned (default: 5).

§dht_enforce_node_id: bool

BEP 42: Enforce node ID verification in DHT routing table. Disabled by default: too many real DHT nodes lack BEP 42-compliant IDs.

§dht_restrict_routing_ips: bool

BEP 42: Restrict DHT routing table to one node per IP.

§dht_max_items: usize

Maximum number of BEP 44 items stored in the DHT (immutable + mutable).

§dht_item_lifetime_secs: u64

Lifetime of BEP 44 DHT items in seconds before expiry (default: 7200 = 2 hours).

§dht_sample_infohashes_interval: u64

Interval in seconds for periodic sample_infohashes queries (BEP 51). 0 = disabled (default). Non-zero enables background DHT indexing.

§dht_read_only: bool

BEP 43: Run DHT in read-only mode. Read-only nodes can query the DHT but do not store data or announce. Other nodes should not add us to their routing tables. Useful for resource-constrained clients.

§upnp_lease_duration: u32

UPnP lease duration in seconds (default: 3600).

§natpmp_lifetime: u32

NAT-PMP mapping lifetime in seconds (default: 7200).

§utp_max_connections: usize

Maximum concurrent uTP connections (default: 256).

§enable_i2p: bool

Enable I2P anonymous network support (requires SAM bridge).

§i2p_hostname: String

SAM bridge hostname (default: “127.0.0.1”).

§i2p_port: u16

SAM bridge port (default: 7656).

§i2p_inbound_quantity: u8

Number of inbound I2P tunnels (1-16, default: 3).

§i2p_outbound_quantity: u8

Number of outbound I2P tunnels (1-16, default: 3).

§i2p_inbound_length: u8

Number of hops in inbound I2P tunnels (0-7, default: 3).

§i2p_outbound_length: u8

Number of hops in outbound I2P tunnels (0-7, default: 3).

§allow_i2p_mixed: bool

Allow mixing I2P and clearnet peers in the same torrent. When false (default), I2P-enabled torrents only connect to I2P peers.

§ssl_listen_port: u16

SSL listen port for SSL torrent incoming connections. 0 = disabled (no SSL listener). When set, a TLS listener is bound on this port for torrents with ssl-cert in their info dict.

§ssl_cert_path: Option<PathBuf>

Path to the PEM-encoded certificate file for SSL torrent connections. If not set, a self-signed certificate is auto-generated on first use and stored in resume_data_dir (or a temp directory).

§ssl_key_path: Option<PathBuf>

Path to the PEM-encoded private key file for SSL torrent connections.

§seed_choking_algorithm: SeedChokingAlgorithm

Algorithm for ranking peers during seed-mode choking.

§choking_algorithm: ChokingAlgorithm

Algorithm for determining the number of unchoke slots.

§max_peers_per_torrent: usize

Maximum peer connections per torrent (default: 128). When 0, falls back to HARD_PEER_CEILING (4096) — there is no “unlimited” mode, see Bug 7 fix in v0.187.3.

§pass0_grace_secs: u64

v0.187.3 / OV2 / 12A: seconds after a peer goes Live before Pass 0 (zero-throughput) eviction can fire against it. Default 60. Prevents the proactive-eviction loop from culling peers still in BitTorrent slow-start. 0 = disable grace (legacy v0.187.2 behaviour).

§proactive_evictions_per_minute_limit: u32

v0.187.3 / 3A: sliding-window cap on proactive evictions in any rolling 60s window. Default 30. The churn from the dogfood report (“130 → 20-50 every few seconds”) shows what 0 looks like; this is the upper bound on how aggressive the eviction loop can be.

§eviction_ban_duration_secs: u64

v0.187.3: how long a Pass 0 eviction victim is blocked from reconnection. Default 600 (10 min). Was effectively 1800 (30 min) pre-v0.187.3 — shorter ban duration lets slow peers warm up and rejoin without forcing the user to restart.

§eviction_ban_set_cap: usize

v0.187.3 / OV4: FIFO cap on the banned-peer set. Default 1024 (was 256). With the previous cap, busy swarms thrashed the ban set — peers fell off the back faster than ban duration could elapse.

§peer_read_timeout_secs: u64

M133: Seconds without any wire message before disconnecting a peer. Matches rqbit’s 10s read timeout. 0 = disabled. Default: 10.

§peer_write_timeout_secs: u64

M133: Seconds before a stalled outgoing write disconnects a peer. 0 = disabled. Default: 10.

§data_contribution_timeout_secs: u64

M137: Data contribution timeout — seconds without receiving a Piece message before disconnecting. Set to 0 to disable. Default: 60.

§choke_rotation_max_evictions: u32

M138: Maximum peers to evict per choke rotation tick (0 = disabled).

§max_concurrent_connects: u16

M138: Maximum concurrent outbound peer connections (throttles connect ramp).

§connect_soft_timeout: u64

M147: Seconds without TCP SYN-ACK before soft reap disconnects a connecting peer. Peers that have received SYN-ACK get the full peer_connect_timeout.

§dispatch_backlog_cap: usize

M182: dispatch-channel backlog cap. The reader’s BackpressureQueue spills up to this many items if dispatch_tx is full; on overflow the peer is disconnected. Lowering this value forces overflow under less load — the would-have-caught harness uses cap = 2 to reproduce the M182 backlog-too-small regression class.

§event_backlog_cap: usize

M182: event-channel backlog cap. Same role as Self::dispatch_backlog_cap for the event_tx queue carrying PeerEvent::* from reader to TorrentActor.

§use_actor_dispatch: bool

M187 A/B: use actor-centralised dispatch (true) or per-peer CAS dispatch (false).

§web_seed_progress_throttle_ms: u64

M178: Minimum milliseconds between PeerEvent::WebSeedProgress emissions per URL. Coalesces stat updates from WebSeedTask so the actor channel stays bounded under fast piece-fetch loops. Cold-start (first event for a URL) and error events bypass the throttle. 0 disables coalescing.

§ssrf_mitigation: bool

Enable SSRF mitigation: restrict localhost tracker paths, block public-to-private redirects, and reject query strings on local web seeds.

§allow_idna: bool

Allow internationalised (non-ASCII) domain names in tracker/web seed URLs.

§validate_https_trackers: bool

Require HTTPS for HTTP tracker announces (UDP trackers are unaffected).

§max_metadata_size: u64

Maximum BEP 9 metadata size in bytes that will be accepted from peers. Protects against OOM from peers claiming enormous metadata. Default: 4 MiB.

§max_message_size: usize

Maximum wire protocol message size in bytes. Messages exceeding this are rejected by the codec. Default: 16 MiB.

§max_piece_length: u64

Maximum accepted piece length when adding a torrent. Rejects torrents with piece sizes above this limit. Default: 32 MiB.

§max_outstanding_requests: usize

Maximum outstanding incoming requests per peer. When a peer sends more Request messages than this without them being served, excess requests are dropped. Default: 500.

§max_in_flight_pieces: usize

Maximum number of pieces simultaneously in-flight (downloaded but not yet verified). Caps memory usage for in-progress pieces. When the cap is reached, the piece selector only returns blocks from already-in-flight pieces. Default: 512.

§peer_connect_timeout: u64

Timeout in seconds for outbound TCP peer connections. Default 10. Set to 0 to use the OS default (~2 minutes on Linux).

§peer_dscp: u8

DSCP (Differentiated Services Code Point) value for peer traffic sockets. Applied to TCP listeners, outbound TCP connections, uTP sockets, and UDP tracker sockets. Default 0x08 (CS1/scavenger — low-priority background). Set to 0 to disable DSCP marking.

§stats_report_interval: u64

Interval in milliseconds between SessionStatsAlert emissions. Default 1000 (1 second). Set to 0 to disable periodic stats alerts.

§runtime_worker_threads: usize

Number of tokio worker threads. Default: min(available cores, 8). Set to 0 to use tokio’s default (= available_parallelism()).

§pin_cores: bool

Pin tokio worker threads to CPU cores for cache locality. Default: true.

§lock_warn_threshold_ms: u64

Warning threshold in milliseconds for lock hold duration. When a hot-path lock is held longer than this, a tracing warning is emitted. Set to 0 to disable timing entirely (zero overhead). Default: 50.

§dht_saved_nodes: Vec<String>

Previously saved DHT routing table nodes for fast bootstrap. These are prepended to the bootstrap node list on startup so that peer discovery starts instantly instead of bootstrapping from scratch. Runtime-injected, not serialized.

§dht_node_id: Option<Id20>

BEP 42-compliant DHT node ID from previous session. Reusing the same ID avoids routing table regeneration on every startup. Runtime-injected, not serialized.

§qbt_compat: QbtCompatSettings

qBittorrent WebUI v2 compatibility layer (M168). Opt-in; disabled by default. Enables *arr integration via qBt’s de-facto API protocol. See QbtCompatSettings for full field documentation.

§category_registry_path: Option<PathBuf>

M170: Path to the qBt-compat category registry TOML file. When None, the default $XDG_CONFIG_HOME/irontide/categories.toml resolution is used (matching the config.toml convention).

§tag_registry_path: Option<PathBuf>

M171: Path to the qBt-compat tag registry TOML file. When None, the default $XDG_CONFIG_HOME/irontide/tags.toml resolution is used (matching the category_registry_path convention).

§notify_on_complete: bool

M226: Fire an OS desktop notification when a torrent finishes downloading. Wired through NotificationSink in notification.rs. Default: false.

§notify_on_error: bool

M226: Fire an OS desktop notification when a torrent enters an error state. Default: false.

§on_complete_program: Option<PathBuf>

M226: Path to a program to run on torrent completion (qBt parity field). STORED ONLY — subprocess spawning is deferred to a future engine milestone (child-reaper, env scrubbing, exec safety audit pending). Default: None.

§use_incomplete_dir: bool

M226: Whether in-progress downloads use a separate directory before being moved to download_dir on completion. STORED ONLY — storage layer wiring deferred. Default: false.

§incomplete_dir: Option<PathBuf>

M226: Directory for in-progress downloads (paired with use_incomplete_dir). STORED ONLY — storage layer wiring deferred. Must be absolute when Some. Default: None.

§default_skip_hash_check: bool

M226: Default value for AddTorrentParams.skip_checking when the caller does not specify. STORED ONLY — add-torrent flow wiring is deferred to M227’s GUI “Skip hash check” toggle. Default: false.

§incomplete_extension_enabled: bool

M226: Append .!ut to filenames during download (qBt convention to signal partial files to file managers). STORED ONLY — storage layer wiring deferred. Default: true (qBt parity).

§watched_folder: Option<PathBuf>

M226: Path to a folder to watch for new .torrent files; on detection the file is auto-added to the session. Wired through watched_folder.rs. Must be absolute when Some. Default: None.

§delete_torrent_after_add: bool

M226: After successfully adding a .torrent file from watched_folder, delete the source file. When false, the file is renamed to <name>.duplicate to prevent infinite-rescan (see plan §G2). Default: false (dry-run safe).

§move_completed_enabled: bool

M226: Whether to move completed torrents to move_completed_to. STORED ONLY — on-completion move logic deferred to a future engine milestone. Default: false.

§move_completed_to: Option<PathBuf>

M226: Destination for completed torrents (paired with move_completed_enabled). STORED ONLY — move logic deferred. Must be absolute when Some. Default: None.

§web_ui_https_enabled: bool

M226: Enable HTTPS for the qBt v2 WebUI listener. STORED ONLY — rustls integration deferred to a Phase O follow-on or Phase P milestone. Default: false.

§network_interface: Option<String>

M226: Bind peer listeners to a specific network interface (qBt current_network_interface). STORED ONLY — SO_BINDTODEVICE wiring deferred. Default: None (use 0.0.0.0 / [::]).

§default_add_paused: bool

M226: When AddTorrentParams.paused is None, this default decides whether new torrents start paused. Surfaced through the qBt v2 preferences.rs GET projection as start_paused_enabled. Default: false.

Implementations§

Source§

impl Settings

Source

pub fn min_memory() -> Self

Preset for constrained/embedded environments.

Source

pub fn high_performance() -> Self

Preset for desktop/server environments with ample resources.

Source

pub fn validate(&self) -> Result<()>

Validate settings. Returns error on the first invalid combination found.

§Errors

Returns an error if validation fails.

Trait Implementations§

Source§

impl Clone for Settings

Source§

fn clone(&self) -> Settings

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Settings

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Settings

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Settings

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<&Settings> for BanConfig

Source§

fn from(s: &Settings) -> Self

Converts to this type from the input type.
Source§

impl From<&Settings> for DiskConfig

Source§

fn from(s: &Settings) -> Self

Converts to this type from the input type.
Source§

impl From<&Settings> for TorrentConfig

Source§

fn from(s: &Settings) -> Self

Converts to this type from the input type.
Source§

impl From<&Settings> for UrlSecurityConfig

Source§

fn from(s: &Settings) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Settings

Source§

fn eq(&self, other: &Settings) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Settings

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Settings

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> NoneValue for T
where T: Default,

Source§

type NoneType = T

Source§

fn null_value() -> T

The none-equivalent value.
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,