• Separate internal WireGuard encryption from data carriers

    ab released this 2026-10-22 00:07:52 +00:00 | 0 commits to master since this release

    AWG-only policy also selected a competing end-to-end plugin, so compatible
    external links could still have no compatible encrypted data channel. Carrier
    changes replaced tunnel state and status selected counters from different
    engines. Use one internal WireGuard plugin and a separate DataCarrier contract
    for external capabilities/lifecycle. Keep the logical link, keys, handshake,
    interface and counter epoch across policy, fallback and direct/relay changes.
    Control/discovery transport selection and membership remain independent.

    Share the bounded per-neighbour UDP WireGuard engine between ordinary WG and
    Amnezia masking. Encrypt the relay envelope inside the outer hop channel with
    fresh pair keys/PSK. Remove duplicate WG key/device code and the TCP/TLS inner
    cipher. TLS carries opaque internal WireGuard frames. Refuse missing native
    transports instead of letting default iroh impersonate their protocol names.
    Probe the actual authenticated carrier, independently of the shared IP tunnel;
    failed local probe submissions count as loss too.

    Apply the vendored iroh interface exclusion to actual direct candidates, not
    just public discovery records. Exclude overlay subnets from introductions and
    propagate the actual owned interface name, including kernel-assigned utun names,
    to every carrier. Production logs showed paths through the overlay itself.
    This removes a recursive transport path; it does not establish the historical
    cause of the reported 100 GB absolute counter. Exit-node traffic is also real
    peer IP traffic even when local applications are idle.

    Hide inner cipher choices/handshake clutter in CLI and tray. Report external
    routes, readiness and actionable policy/version failures. Count original IP
    packets only when their ciphertext is accepted by the logical transport,
    including queued packets' exact unpadded lengths. Exclude physical probes and
    keepalives. Export counter epochs; sum per-peer rate deltas and discard stale
    histories so joins/restarts cannot turn old totals into fresh traffic. Status
    also prints exact IP byte totals for comparison with the tray.

    Coordinated upgrade: data ALPN 6, internal wireguard-e2e capability v4,
    wg/awg v2, QUIC carrier v1, TLS v2, local IPC v23. Control ALPN 8, device/network
    identity derivation, signed records and saved network choices stay unchanged.
    Keep the historical wg-quic key store; transactionally import missing keys from
    wg then awg without replacing canonical keys. Forget removes legacy copies too,
    on the blocking pool, to prevent resurrection after restart. Preserve historic
    cipher options as shared settings, rejecting contradictory values.

    Validation on Linux in the Nix development shell:

    • cargo fmt --all -- --check
    • cargo clippy --locked --workspace --all-targets -- -D warnings
    • cargo test --locked --workspace --all-targets (562 passed, 3 ignored)
      The inherited service socket/secret/group environment overrides were removed
      for isolated CLI process tests. A new carrier test initially raced the first
      peer announcement; its deadline polling now waits for a peer row explicitly.
      Real loopback endpoints, membership, SQLite, WG/AWG/TLS encryption and memory
      TUNs cover mixed-carrier relaying and one smoltcp TCP connection surviving
      relay/direct/policy changes and a dropped transmission. Counter tests check
      exact plaintext lengths, refused sends, epochs, joins and stale histories.
      Public DHT, privileged kernel and manual benchmark tests remain ignored;
      macOS/Windows native TUNs, desktop GUI and WAN/DPI behavior were not run.
    Downloads