mirror of
https://github.com/nimbold/Firelink.git
synced 2026-08-20 08:02:16 +00:00
fix(settings): harden Torrent network validation
- Align the DHT message-timeout range with bundled Aria2 1.37.0. - Validate and canonicalize Torrent network text settings at the native boundary. - Fence delayed input responses and reject contradictory IPv6 bind state. - Add regression coverage for malformed settings and cross-field races.
This commit is contained in:
@@ -81,7 +81,8 @@ export const MIN_TORRENT_MAX_OPEN_FILES = 1;
|
||||
export const MAX_TORRENT_MAX_OPEN_FILES = 4096;
|
||||
export const DEFAULT_TORRENT_DHT_MESSAGE_TIMEOUT = 10;
|
||||
export const MIN_TORRENT_DHT_MESSAGE_TIMEOUT = 1;
|
||||
export const MAX_TORRENT_DHT_MESSAGE_TIMEOUT = 600;
|
||||
// Aria2 1.37.0 accepts DHT message timeouts only from 1 through 60 seconds.
|
||||
export const MAX_TORRENT_DHT_MESSAGE_TIMEOUT = 60;
|
||||
export const DEFAULT_TORRENT_MAX_CONCURRENT_SEEDS = 2;
|
||||
export const MIN_TORRENT_MAX_CONCURRENT_SEEDS = 1;
|
||||
export const MAX_TORRENT_MAX_CONCURRENT_SEEDS = 64;
|
||||
|
||||
Reference in New Issue
Block a user