capabable spawning multiple openvpn instances
This commit is contained in:
@@ -22,12 +22,6 @@ pub struct Config {
|
||||
#[serde(default)]
|
||||
pub enable_vpn_rotation: bool,
|
||||
|
||||
/// Comma-separated list of VPN servers/country codes to rotate through.
|
||||
/// Example: "US-Free#1,UK-Free#1,JP-Free#1" or "US,JP,DE"
|
||||
/// If empty, VPN rotation is disabled.
|
||||
#[serde(default)]
|
||||
pub vpn_servers: String,
|
||||
|
||||
/// Number of tasks per session before rotating VPN
|
||||
/// If set to 0, rotates VPN between economic and corporate phases
|
||||
#[serde(default = "default_tasks_per_session")]
|
||||
@@ -51,7 +45,6 @@ impl Default for Config {
|
||||
max_parallel_instances: default_max_parallel_instances(),
|
||||
max_tasks_per_instance: 0,
|
||||
enable_vpn_rotation: false,
|
||||
vpn_servers: String::new(),
|
||||
tasks_per_vpn_session: default_tasks_per_session(),
|
||||
}
|
||||
}
|
||||
@@ -100,9 +93,6 @@ impl Config {
|
||||
.parse::<bool>()
|
||||
.context("Failed to parse ENABLE_VPN_ROTATION as bool")?;
|
||||
|
||||
let vpn_servers = dotenvy::var("VPN_SERVERS")
|
||||
.unwrap_or_else(|_| String::new());
|
||||
|
||||
let tasks_per_vpn_session: usize = dotenvy::var("TASKS_PER_VPN_SESSION")
|
||||
.unwrap_or_else(|_| "0".to_string())
|
||||
.parse()
|
||||
@@ -115,7 +105,6 @@ impl Config {
|
||||
max_parallel_instances,
|
||||
max_tasks_per_instance,
|
||||
enable_vpn_rotation,
|
||||
vpn_servers,
|
||||
tasks_per_vpn_session,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user