mirror of
https://github.com/sadoyan/aralez.git
synced 2026-10-23 06:01:35 +08:00
Intermediate commit fo DNS Challenge
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use dashmap::DashMap;
|
||||
use moka::sync::Cache;
|
||||
use pingora_cache::MemCache;
|
||||
use pingora_cache::eviction::simple_lru::Manager;
|
||||
use pingora_cache::lock::CacheLock;
|
||||
use pingora_cache::MemCache;
|
||||
use pingora_limits::rate::Rate;
|
||||
use std::collections::HashMap;
|
||||
use std::net::IpAddr;
|
||||
@@ -19,3 +19,4 @@ pub static CACHE_LOCK: LazyLock<CacheLock> = LazyLock::new(|| CacheLock::new(Dur
|
||||
pub static EVICTION: OnceLock<Manager> = OnceLock::new();
|
||||
pub static CACHE_TTL: OnceLock<u64> = OnceLock::new();
|
||||
pub static CHALLENGES: LazyLock<RwLock<HashMap<String, String>>> = LazyLock::new(|| RwLock::new(HashMap::new()));
|
||||
pub static DOMAINS: LazyLock<DashMap<String, bool>> = LazyLock::new(DashMap::new);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::utils::healthcheck;
|
||||
use crate::utils::lazylock::REVERSE_STORE;
|
||||
use crate::utils::lazylock::{DOMAINS, REVERSE_STORE};
|
||||
use crate::utils::state::{is_first_run, mark_not_first_run};
|
||||
use crate::utils::tools::{clone_dashmap, clone_dashmap_into, print_upstreams};
|
||||
use crate::utils::types::*;
|
||||
@@ -7,12 +7,10 @@ use dashmap::DashMap;
|
||||
use log::{error, info, warn};
|
||||
use std::collections::HashMap;
|
||||
use std::path::Path;
|
||||
use std::sync::Arc;
|
||||
use std::sync::atomic::AtomicUsize;
|
||||
use std::sync::{Arc, LazyLock};
|
||||
use std::{env, fs};
|
||||
|
||||
pub static DOMAINS: LazyLock<DashMap<String, bool>> = LazyLock::new(DashMap::new);
|
||||
|
||||
pub async fn load_configuration(d: &str, kind: &str) -> (Option<Configuration>, String) {
|
||||
let mut conf_files = Vec::new();
|
||||
let yaml_data = match kind {
|
||||
|
||||
@@ -134,6 +134,7 @@ pub struct AppConfig {
|
||||
pub log_file: Option<String>,
|
||||
pub log_pattern: Option<String>,
|
||||
pub log_structured: Option<String>,
|
||||
pub acme_dns_provider: Option<String>,
|
||||
pub tcp_keepalive_idle: Option<u64>,
|
||||
pub tcp_keepalive_interval: Option<u64>,
|
||||
pub tcp_keepalive_count: Option<usize>,
|
||||
|
||||
Reference in New Issue
Block a user