#[derive(Debug, Clone)]
pub struct OnionRequestRouterConfig {
pub path_strike_threshold: u8,
pub path_build_retry_limit: u8,
pub single_path_mode: bool,
pub disable_pre_build_paths: bool,
pub path_rotation_frequency_secs: u64,
}
impl Default for OnionRequestRouterConfig {
fn default() -> Self {
Self {
path_strike_threshold: 3,
path_build_retry_limit: 10,
single_path_mode: false,
disable_pre_build_paths: false,
path_rotation_frequency_secs: 600,
}
}
}
pub struct OnionRequestRouter {
pub config: OnionRequestRouterConfig,
}
impl OnionRequestRouter {
pub fn new(config: OnionRequestRouterConfig) -> Self {
Self { config }
}
}