pub struct ScatterProxyConfig {Show 20 fields
pub sources: Vec<String>,
pub source_refresh_interval: Duration,
pub rate_limit: RateLimitConfig,
pub proxy_timeout: Duration,
pub task_timeout: Duration,
pub max_concurrent_per_request: usize,
pub max_inflight: usize,
pub max_attempts: usize,
pub task_pool_capacity: usize,
pub health_window: usize,
pub cooldown_base: Duration,
pub cooldown_max: Duration,
pub cooldown_consecutive_fails: usize,
pub eviction_min_samples: usize,
pub circuit_breaker_threshold: usize,
pub circuit_breaker_probe_interval: Duration,
pub state_file: Option<PathBuf>,
pub state_save_interval: Duration,
pub metrics_log_interval: Duration,
pub prefer_remote_dns: bool,
}Expand description
Main configuration for ScatterProxy.
Fields§
§sources: Vec<String>URLs of proxy sources (line-delimited ip:port or socks5://ip:port).
source_refresh_interval: DurationHow often to re-fetch proxy sources (default: 10 min).
rate_limit: RateLimitConfigPer-(proxy, host) rate-limiting configuration.
proxy_timeout: DurationTimeout for a single proxy connection attempt (default: 8s).
task_timeout: DurationOverall timeout for a task from submission to final failure (default: 60s).
max_concurrent_per_request: usizeNumber of concurrent proxy paths raced per request (default: 3).
max_inflight: usizeGlobal in-flight concurrency limit (default: 100).
max_attempts: usizeMaximum scheduling attempts per task before giving up (default: 5).
task_pool_capacity: usizeMaximum number of pending tasks in the pool (default: 1000).
health_window: usizeSliding window size for health tracking (default: 30).
cooldown_base: DurationBase cooldown duration after consecutive failures (default: 30s).
cooldown_max: DurationMaximum cooldown duration (default: 300s).
cooldown_consecutive_fails: usizeNumber of consecutive failures before entering cooldown (default: 3).
eviction_min_samples: usizeMinimum samples required before a proxy can be evicted (default: 30).
circuit_breaker_threshold: usizeNumber of target errors before tripping the host circuit breaker (default: 10).
circuit_breaker_probe_interval: DurationInterval between probe requests when a circuit breaker is open (default: 30s).
state_file: Option<PathBuf>Optional file path for persisting proxy state as JSON.
state_save_interval: DurationHow often to save state to disk (default: 5 min).
metrics_log_interval: DurationHow often to log the metrics summary line (default: 30s).
prefer_remote_dns: boolWhether to prefer remote DNS resolution through the SOCKS5 proxy (default: true).