pub struct ScatterProxyConfig {Show 19 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>,
pub max_requests_per_proxy: Option<u32>,
pub challenge_cooldown: Duration,
}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.
max_requests_per_proxy: Option<u32>Maximum cumulative requests per proxy node before it is voluntarily retired.
After reaching this limit the proxy transitions to Retired and is excluded
from scheduling. Retired nodes are automatically reset when they appear
again in a source refresh. None disables the limit (default).
challenge_cooldown: DurationMinimum interval between WAF challenge solve attempts on the same proxy node.
Prevents hammering the resolver on a hot proxy. Default: 60 seconds.
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