INNER CODE UNIT · Rust

wiw_scan_requested

CluvexStudio/Aether · aether/src/lib.rs:266

fn wiw_scan_requested(lookup: &dyn Fn(&str) -> Option<String>) -> bool {
    match lookup("AETHER_WIW_PEERS") {
        Some(value) => matches!(
            value.to_lowercase().as_str(),
            "auto" | "scan" | "none" | "off" | "0"
        ),
        None => false,
    }
}

/// The hops named through the warp-in-warp settings. `AETHER_WIW_PEERS` carries
/// the pair, and the per-hop settings win over it.
fn wiw_endpoints_of(lookup: &dyn Fn(&str) -> Option<String>) -> Result<WiwEndpoints> {
    let mut chosen = WiwEndpoints::default();

    if let Some(list) = lookup("AETHER_WIW_PEERS") {
        if !wiw_scan_requested(lookup) {
            let peers = parse_endpoint_list(&list)?;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…