libsession 0.1.3

Session messenger core library - cryptography, config management, networking
Documentation
//! Stub onion request router.
//!
//! Full implementation requires path building with live network testing.

/// Configuration for the onion request router.
#[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,
        }
    }
}

/// Stub onion request router. Full implementation pending integration testing.
pub struct OnionRequestRouter {
    pub config: OnionRequestRouterConfig,
}

impl OnionRequestRouter {
    /// Creates a new onion request router with the given configuration.
    pub fn new(config: OnionRequestRouterConfig) -> Self {
        Self { config }
    }
}