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: u16TCP listen port for incoming peer connections (default: 42020).
randomize_port_on_startup: boolRandomize the listen port each time the session starts. Default: false.
download_dir: PathBufDefault download directory for new torrents (default: “.”).
max_torrents: usizeMaximum 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: u64Interval in seconds between periodic resume file saves (0 = disabled). Default: 300 (5 minutes).
enable_dht: boolEnable Kademlia DHT peer discovery (BEP 5). Default: true.
enable_pex: boolEnable Peer Exchange (BEP 11). Default: true.
enable_lsd: boolEnable Local Service Discovery via multicast (BEP 14). Default: true.
enable_fast_extension: boolEnable BEP 6 Fast Extension (AllowedFast, HaveAll, HaveNone, Reject,
SuggestPiece). Default: true.
enable_utp: boolEnable 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: boolEnable UPnP IGD port mapping (last resort after PCP and NAT-PMP).
Default: true.
enable_natpmp: boolEnable NAT-PMP (RFC 6886) and PCP (RFC 6887) port mapping. PCP is tried first, then NAT-PMP as fallback. Default: true.
enable_ipv6: boolEnable 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: boolEnable 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: boolEnable 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: boolEnable 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: boolEnable 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: EncryptionModeConnection encryption mode (MSE/PE). Default: Disabled.
anonymous_mode: boolSuppress 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: MaxRatioActionM171: What to do when seed_ratio_limit is reached.
Mirrors qBt’s max_ratio_act wire enum. Default: Pause.
create_subfolder: boolM171: 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: boolM171: Automatically manage torrent resources via the queueing
subsystem (start/stop/recheck order). Mirrors qBt’s
auto_tmm_enabled. Default: false.
queueing_enabled: boolM171: 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: boolEnable BEP 16 super seeding for new torrents. Reveals pieces one-per-peer to maximize piece diversity across the swarm. Default: false.
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: boolAdvertise upload-only status via extension handshake when a torrent transitions to seeding (BEP 21). Default: true.
upload_rate_limit: u64Global upload rate limit in bytes/sec (0 = unlimited).
download_rate_limit: u64Global download rate limit in bytes/sec (0 = unlimited).
tcp_upload_rate_limit: u64TCP upload rate limit in bytes/sec (0 = unlimited).
tcp_download_rate_limit: u64TCP download rate limit in bytes/sec (0 = unlimited).
utp_upload_rate_limit: u64uTP upload rate limit in bytes/sec (0 = unlimited).
utp_download_rate_limit: u64uTP download rate limit in bytes/sec (0 = unlimited).
auto_upload_slots: boolAutomatically adjust the number of upload slots based on bandwidth. Default: true.
auto_upload_slots_min: usizeMinimum number of automatic upload slots (default: 2).
auto_upload_slots_max: usizeMaximum number of automatic upload slots (default: 20).
max_upload_slots_global: i32Maximum upload slots across all torrents (-1 = unlimited). Default: -1.
max_upload_slots_per_torrent: i32Maximum upload slots per torrent. Default: 4.
max_connections_global: i32Maximum peer connections across all torrents (-1 = unlimited). Default: -1.
max_uploads_per_torrent: i32Maximum 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: u64Alternative download rate limit in bytes/sec (0 = unlimited).
alt_upload_rate_limit: u64Alternative upload rate limit in bytes/sec (0 = unlimited).
alt_speed_enabled: boolWhether alternative speed limits are currently active. Default: false.
alt_speed_schedule_enabled: boolWhether the alternative speed schedule is enabled. Default: false.
alt_speed_schedule_from: u16Schedule start time in minutes-of-day (0-1439). Default: 0.
alt_speed_schedule_to: u16Schedule end time in minutes-of-day (0-1439). Default: 0.
alt_speed_schedule_days: u8Schedule active days as a bitmask (bit 0 = Mon .. bit 6 = Sun). Default: 0.
rate_limit_includes_overhead: boolInclude protocol overhead in rate limit calculations. Default: true.
rate_limit_utp: boolApply rate limits to uTP connections. Default: true.
rate_limit_lan: boolApply rate limits to LAN connections. Default: false.
mixed_mode_algorithm: MixedModeAlgorithmMixed-mode TCP/uTP bandwidth allocation algorithm.
active_downloads: i32Maximum concurrent auto-managed downloading torrents (-1 = unlimited, default: 3).
active_seeds: i32Maximum concurrent auto-managed seeding torrents (-1 = unlimited, default: 5).
active_limit: i32Hard cap on all active auto-managed torrents (-1 = unlimited, default: 500).
active_checking: i32Maximum concurrent hash-check operations (default: 1).
dont_count_slow_torrents: boolExempt 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: u64Download rate threshold (bytes/sec) below which a torrent is considered inactive for queue management purposes (default: 2048).
inactive_up_rate: u64Upload rate threshold (bytes/sec) below which a torrent is considered inactive for queue management purposes (default: 2048).
auto_manage_interval: u64Interval in seconds between queue evaluations (default: 30).
auto_manage_startup: u64Grace period in seconds where a torrent is considered active regardless of speed after being started (default: 60).
auto_manage_prefer_seeds: boolAllocate seeding slots before download slots. Default: false.
queue_rate_ewma_alpha: f64EWMA 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: u64Anti-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: AlertCategoryBitmask of alert categories to receive (default: ALL).
alert_channel_size: usizeCapacity of the alert broadcast channel (default: 1024).
smart_ban_max_failures: u32Number of hash-failure involvements before a peer is auto-banned. Lower values ban faster but risk false positives (default: 3).
smart_ban_parole: boolEnable parole mode: re-download a failed piece from a single uninvolved peer to definitively attribute fault before striking. Default: true.
disk_io_threads: usizeNumber of concurrent disk I/O threads (default: 4).
max_blocking_threads: usizeMaximum number of concurrent blocking I/O operations dispatched via
block_in_place. Defaults to the number of available CPU cores.
storage_mode: StorageModeStorage 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: usizeTotal ARC disk cache size in bytes (default: 16 MiB, minimum: 1 MiB).
disk_write_cache_ratio: f32Fraction of disk cache reserved for write buffering (0.0–1.0, default: 0.5).
disk_channel_capacity: usizeCapacity of the async disk I/O command channel (default: 512).
buffer_pool_capacity: usizeUnified buffer pool capacity in bytes (default: 64 MiB).
Replaces disk_cache_size when set. Covers both write buffering and read cache.
enable_mlock: boolLock 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: u32io_uring submission queue depth (number of SQEs). Only used when
storage_mode is IoUring. Default: 256.
io_uring_direct_io: boolEnable O_DIRECT for io_uring writes, bypassing the kernel page cache.
Unaligned writes fall back to regular pwritev. Default: false.
filesystem_direct_io: boolEnable 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: usizeMinimum number of file segments to batch before using io_uring.
Below this threshold, pwritev may be cheaper. Default: 4.
iocp_concurrent_threads: u32IOCP concurrent thread count (0 = system default). Only used when
storage_mode is Iocp. Default: 0.
iocp_direct_io: boolEnable FILE_FLAG_NO_BUFFERING for IOCP I/O, bypassing the OS page cache.
Requires sector-aligned writes. Default: false.
hashing_threads: usizeNumber of concurrent piece hash verification threads (default: 2).
max_request_queue_depth: usizeMaximum per-peer request queue depth (default: 250).
initial_queue_depth: usizeInitial per-peer request queue depth (default: 128). Higher values let peers reach full throughput faster by skipping slow-start ramp-up.
request_queue_time: f64Request 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: u32Block request timeout in seconds before the request is considered lost and re-issued (default: 60).
max_concurrent_stream_reads: usizeMaximum concurrent FileStream readers. Controls how many simultaneous
file-streaming reads can proceed (default: 8).
auto_sequential: boolAutomatically switch to sequential piece picking when too many partial pieces accumulate. Uses hysteresis (1.6x activate / 1.3x deactivate).
strict_end_game: boolIn 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: usizeMaximum concurrent web seed connections per torrent (default: 4).
web_seed_retry_base_secs: u64M186: Base delay (seconds) for web seed exponential backoff. Default: 10.
web_seed_retry_factor: u64M186: Multiplier for web seed exponential backoff. Default: 6.
web_seed_retry_cap_secs: u64M186: Maximum backoff (seconds) for web seed retry. Default: 3600.
web_seed_max_failures: u32M186: Consecutive failures before permanently banning a web seed. Default: 10.
initial_picker_threshold: u32Completed piece count below which the picker uses random selection to promote piece diversity in the swarm. Default: 4.
whole_pieces_threshold: u32Seconds to download a piece — if a peer is faster, it gets exclusive assignment (no block splitting). Default: 20.
snub_timeout_secs: u32Seconds without data from a peer before marking it as snubbed. Snubbed peers get queue depth clamped to 1. Default: 60.
readahead_pieces: u32Number of pieces ahead of the streaming cursor to prioritize (default: 8).
streaming_timeout_escalation: boolEscalate streaming piece requests that exceed the mean RTT. Default: true.
steal_threshold_ratio: f64Steal blocks from peers this many times slower than the requesting peer (default: 10.0). Set to 0.0 to disable stealing.
use_block_stealing: boolEnable per-block stealing: fast peers can steal individual unrequested blocks from pieces reserved by slower peers (default: true).
steal_stale_piece_secs: u64Seconds 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: f64M149: Steal threshold multiplier when >90% complete (endgame).
Pieces taking longer than swarm_avg * this value are stolen. Default: 3.0.
fixed_pipeline_depth: usizeFixed 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: boolPrefer pieces adjacent to those already downloaded for improved sequential disk access patterns (4 MiB extent groups). Default: true.
suggest_mode: boolEnable 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: usizeMaximum SuggestPiece messages per peer to avoid flooding (default: 10).
predictive_piece_announce_ms: u64Predictive 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: ProxyConfigProxy configuration for peer and tracker connections. Default: no proxy.
force_proxy: boolForce all connections through the configured proxy. Disables listen
sockets, UPnP, NAT-PMP, DHT, and LSD. Default: false.
ip_filter_enabled: boolEnable the IP filter (blocklist). Default: false.
ip_filter_path: StringPath to the IP filter file (e.g. ipfilter.dat). Default: empty.
ip_filter_auto_refresh: boolAutomatically refresh the IP filter when the file changes. Default: false.
apply_ip_filter_to_trackers: boolCheck tracker IP addresses against the IP filter. When false, trackers are exempt from IP filtering. Default: true.
dht_queries_per_second: usizeMaximum DHT queries per second to control network traffic (default: 50).
dht_query_timeout_secs: u64Timeout in seconds for a single DHT query before it is abandoned (default: 5).
dht_enforce_node_id: boolBEP 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: boolBEP 42: Restrict DHT routing table to one node per IP.
dht_max_items: usizeMaximum number of BEP 44 items stored in the DHT (immutable + mutable).
dht_item_lifetime_secs: u64Lifetime of BEP 44 DHT items in seconds before expiry (default: 7200 = 2 hours).
dht_sample_infohashes_interval: u64Interval in seconds for periodic sample_infohashes queries (BEP 51).
0 = disabled (default). Non-zero enables background DHT indexing.
dht_read_only: boolBEP 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: u32UPnP lease duration in seconds (default: 3600).
natpmp_lifetime: u32NAT-PMP mapping lifetime in seconds (default: 7200).
utp_max_connections: usizeMaximum concurrent uTP connections (default: 256).
enable_i2p: boolEnable I2P anonymous network support (requires SAM bridge).
i2p_hostname: StringSAM bridge hostname (default: “127.0.0.1”).
i2p_port: u16SAM bridge port (default: 7656).
i2p_inbound_quantity: u8Number of inbound I2P tunnels (1-16, default: 3).
i2p_outbound_quantity: u8Number of outbound I2P tunnels (1-16, default: 3).
i2p_inbound_length: u8Number of hops in inbound I2P tunnels (0-7, default: 3).
i2p_outbound_length: u8Number of hops in outbound I2P tunnels (0-7, default: 3).
allow_i2p_mixed: boolAllow mixing I2P and clearnet peers in the same torrent. When false (default), I2P-enabled torrents only connect to I2P peers.
ssl_listen_port: u16SSL 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: SeedChokingAlgorithmAlgorithm for ranking peers during seed-mode choking.
choking_algorithm: ChokingAlgorithmAlgorithm for determining the number of unchoke slots.
max_peers_per_torrent: usizeMaximum 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: u64v0.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: u32v0.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: u64v0.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: usizev0.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: u64M133: Seconds without any wire message before disconnecting a peer. Matches rqbit’s 10s read timeout. 0 = disabled. Default: 10.
peer_write_timeout_secs: u64M133: Seconds before a stalled outgoing write disconnects a peer. 0 = disabled. Default: 10.
data_contribution_timeout_secs: u64M137: Data contribution timeout — seconds without receiving a Piece message before disconnecting. Set to 0 to disable. Default: 60.
choke_rotation_max_evictions: u32M138: Maximum peers to evict per choke rotation tick (0 = disabled).
max_concurrent_connects: u16M138: Maximum concurrent outbound peer connections (throttles connect ramp).
connect_soft_timeout: u64M147: 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: usizeM182: 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: usizeM182: 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: boolM187 A/B: use actor-centralised dispatch (true) or per-peer CAS dispatch (false).
web_seed_progress_throttle_ms: u64M178: 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: boolEnable SSRF mitigation: restrict localhost tracker paths, block public-to-private redirects, and reject query strings on local web seeds.
allow_idna: boolAllow internationalised (non-ASCII) domain names in tracker/web seed URLs.
validate_https_trackers: boolRequire HTTPS for HTTP tracker announces (UDP trackers are unaffected).
max_metadata_size: u64Maximum 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: usizeMaximum wire protocol message size in bytes. Messages exceeding this are rejected by the codec. Default: 16 MiB.
max_piece_length: u64Maximum accepted piece length when adding a torrent. Rejects torrents with piece sizes above this limit. Default: 32 MiB.
max_outstanding_requests: usizeMaximum 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: usizeMaximum 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: u64Timeout in seconds for outbound TCP peer connections. Default 10. Set to 0 to use the OS default (~2 minutes on Linux).
peer_dscp: u8DSCP (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: u64Interval in milliseconds between SessionStatsAlert emissions.
Default 1000 (1 second). Set to 0 to disable periodic stats alerts.
runtime_worker_threads: usizeNumber of tokio worker threads. Default: min(available cores, 8).
Set to 0 to use tokio’s default (= available_parallelism()).
pin_cores: boolPin tokio worker threads to CPU cores for cache locality. Default: true.
lock_warn_threshold_ms: u64Warning 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: QbtCompatSettingsqBittorrent 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: boolM226: Fire an OS desktop notification when a torrent finishes
downloading. Wired through NotificationSink in notification.rs.
Default: false.
notify_on_error: boolM226: 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: boolM226: 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: boolM226: 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: boolM226: 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: boolM226: 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: boolM226: 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: boolM226: 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: boolM226: 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
impl Settings
Sourcepub fn min_memory() -> Self
pub fn min_memory() -> Self
Preset for constrained/embedded environments.
Sourcepub fn high_performance() -> Self
pub fn high_performance() -> Self
Preset for desktop/server environments with ample resources.