capabable spawning multiple openvpn instances

This commit is contained in:
2025-12-11 00:36:46 +01:00
parent c9da56e8e9
commit 470f0922ed
17 changed files with 3000 additions and 104 deletions

View File

@@ -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,
})
}