INNER CODE UNIT · Rust

wiw_endpoints_from_env

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

fn wiw_endpoints_from_env() -> Result<WiwEndpoints> {
    wiw_endpoints_of(&env_value)
}

/// `--peer` and `--wg-peer` are older than the warp-in-warp settings and the
/// guides already pair them with `--gool`, so they still name the outer hop.
fn wiw_endpoints_with_fallback(lookup: &dyn Fn(&str) -> Option<String>) -> Result<WiwEndpoints> {
    let mut chosen = wiw_endpoints_of(lookup)?;

    if chosen.outer.is_some() {
        return Ok(chosen);
    }

    let forced = lookup("AETHER_WG_PEER").or_else(|| lookup("AETHER_PEER"));
    let Some(forced) = forced else {
        return Ok(chosen);
    };

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…