Compare commits
2 Commits
2416947e9d
...
c9da56e8e9
| Author | SHA1 | Date | |
|---|---|---|---|
| c9da56e8e9 | |||
| dde859b071 |
@@ -42,10 +42,6 @@ fn default_tasks_per_session() -> usize {
|
|||||||
0 // 0 = rotate between economic/corporate
|
0 // 0 = rotate between economic/corporate
|
||||||
}
|
}
|
||||||
|
|
||||||
fn default_protonvpn_extension_id() -> String {
|
|
||||||
"ghmbeldphafepmbegfdlkpapadhbakde".to_string()
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Default for Config {
|
impl Default for Config {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
@@ -124,19 +120,6 @@ impl Config {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the list of VPN servers configured for rotation
|
|
||||||
pub fn get_vpn_servers(&self) -> Vec<String> {
|
|
||||||
if self.vpn_servers.is_empty() {
|
|
||||||
Vec::new()
|
|
||||||
} else {
|
|
||||||
self.vpn_servers
|
|
||||||
.split(',')
|
|
||||||
.map(|s| s.trim().to_string())
|
|
||||||
.filter(|s| !s.is_empty())
|
|
||||||
.collect()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn target_end_date(&self) -> String {
|
pub fn target_end_date(&self) -> String {
|
||||||
let now = chrono::Local::now().naive_local().date();
|
let now = chrono::Local::now().naive_local().date();
|
||||||
let future = now + chrono::Duration::days(30 * self.economic_lookahead_months as i64);
|
let future = now + chrono::Duration::days(30 * self.economic_lookahead_months as i64);
|
||||||
|
|||||||
@@ -12,14 +12,14 @@
|
|||||||
use anyhow::{anyhow, Context, Result};
|
use anyhow::{anyhow, Context, Result};
|
||||||
use fantoccini::{Client, Locator};
|
use fantoccini::{Client, Locator};
|
||||||
use reqwest;
|
use reqwest;
|
||||||
use std::io::{self, Read};
|
use std::io::{Read};
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use tokio::fs::File;
|
use tokio::fs::File;
|
||||||
use tokio::io::AsyncWriteExt;
|
use tokio::io::AsyncWriteExt;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
use zip::ZipArchive;
|
use zip::ZipArchive;
|
||||||
use crate::scraper::webdriver::{ChromeDriverPool, ScrapeTask};
|
use crate::scraper::webdriver::{ChromeDriverPool, ScrapeTask};
|
||||||
use crate::util::{logger, directories::DataPaths};
|
use crate::util::{directories::DataPaths};
|
||||||
|
|
||||||
/// Fetches, downloads, and extracts the latest OpenVPN configurations from VPNBook.
|
/// Fetches, downloads, and extracts the latest OpenVPN configurations from VPNBook.
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user