pub struct ScatterProxyConfig {Show 17 fields
pub sources: Vec<String>,
pub source_refresh_interval: Duration,
pub rate_limit: RateLimitConfig,
pub proxy_timeout: Duration,
pub max_concurrent_per_request: usize,
pub max_inflight: 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 state_file: Option<PathBuf>,
pub state_save_interval: Duration,
pub metrics_log_interval: Duration,
pub prefer_remote_dns: bool,
pub name: Option<String>,
}Expand description
Main configuration for ScatterProxy.
Fields§
§sources: Vec<String>URLs of proxy sources (line-delimited ip:port or socks5://ip:port).
When empty, DEFAULT_PROXY_SOURCES are used automatically.
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).
max_concurrent_per_request: usizeNumber of concurrent proxy paths raced per request (default: 3).
max_inflight: usizeGlobal in-flight concurrency limit (default: 100).
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).
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).
name: Option<String>Optional label included in metrics log lines (default: None).
When set, every periodic metrics log line is prefixed with [name].
Useful when running multiple ScatterProxy instances (e.g. one per host
via ScatterProxyRouter) to tell them apart in logs.
Trait Implementations§
Source§impl Clone for ScatterProxyConfig
impl Clone for ScatterProxyConfig
Source§fn clone(&self) -> ScatterProxyConfig
fn clone(&self) -> ScatterProxyConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more