Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/gunnar

crates/gunnar-front/tests/egress_door_off_by_default.rs

//! **AIRGAP B2: the front's egress door is off unless built and switched on** (owner rule
//! 2026-10-25). The door is an outbound CONNECT proxy for the boxes behind the front (main
//! and the twin leave through it to TLS ports on outside addresses), so it opens only in a
//! front built with `egress-door` AND started with `GUNNAR_FRONT_EGRESS=on`. Every front row
//! names the feature and every front medium sets the switch (gunnar-recipe airgap_rows).

#[test]
fn pid1_opens_the_egress_door_only_behind_the_gate() {
    let src = include_str!("../src/pid1.rs");
    let at = src
        .find("nordisk_pairing::egress::serve(")
        .expect("pid1 opens the egress door");
    let before = &src[..at];
    let gate = before
        .rfind("crate::egress_door::open_here()")
        .expect("the door is opened behind egress_door::open_here()");
    assert!(
        at - gate < 400,
        "the gate is right before the door, not somewhere above it"
    );
}