Skip to content

scanner: faster reconnects, better MASQUE port coverage, cheap reachability pre-filter - #103

Open
Amo643 wants to merge 2 commits into
CluvexStudio:mainfrom
Amo643:scanner-quality
Open

Amo643 wants to merge 2 commits into
CluvexStudio:mainfrom
Amo643:scanner-quality

Conversation

@Amo643

@Amo643 Amo643 commented Sep 7, 2026

Copy link
Copy Markdown

What

Four bounded improvements to the endpoint scanners. No CLI changes, fully backward compatible.

1. Recent-winners ring (lastconn.rs, lib.rs)

LastConnection now also stores a most-recent-first ring of working endpoints (recent, cap 8, #[serde(default)] — old files load unchanged). Both run_masque and run_wireguard try the ring newest-first before any sweep, so a reconnect usually completes in seconds instead of falling into a full scan after a single stale cached peer.

2. MASQUE port waves (prober.rs::build_candidates)

Previously the pool of sampled CIDR hosts was only probed on the primary port (443); the multi-port loop covered the 8 seeds only. The WG scanner already rotated ports for its pool (ports[(idx + wave) % port_count]), so this brings MASQUE to the same shape: wave 0 rotates ports across the ordered list, wave 1 covers each address once more on its next rotated port. Anchors keep their lead positions plus full multi-port tail coverage, as before. Tested: anchors_still_lead_in_position_with_spread_ports, pool_hosts_get_a_rotated_alternate_port_up_front, candidate_list_has_no_duplicates.

3. Cheap reachability pre-filter (prober.rs::verify_one)

Non-ironclad probes send one bare QUIC Initial (TCP SYN when the HTTP/2 transport is enabled) and skip the full crypto handshake when the host stays silent. A real MASQUE edge must answer an Initial (RFC 9000), and the codebase's own range-characterization test already treats any Initial reply as liveness. Ironclad mode is untouched (no pre-filter, full HTTP request per candidate). Budget: prefilter_timeout = half the per-probe timeout, clamped to 2–5 s.

4. AETHER_PROBE_JITTER_MS

Optional max per-probe random start delay (default 0 = unchanged behavior) to smooth scan bursts on networks that rate-limit scanners. Documented in --help.

Not changed

Strategy deadlines, concurrency caps, CIDR/seed lists, candidate head ordering for the scan log, ironclad flow, file formats (additive serde fields only).

Verification

  • cargo test: 269 passed / 0 failed (11 new offline unit tests; the live-network characterization test stays #[ignore]d)
  • cargo clippy: clean on all touched files
  • cargo build --release: clean (macOS arm64)
  • Live end-to-end check of the ring fast path with loopback-only peers: log shows newest-first iteration and clean fallback to a fresh scan; no production traffic involved

opencode added 2 commits September 7, 2026 23:43
- lastconn keeps a most-recent-first ring (cap 8, backward compatible);
  reconnect tries the ring before any scan
- MASQUE candidates rotate ports in waves (pool hosts no longer
  primary-port-only), anchors keep lead position + full tail coverage
- verify_one runs a cheap Initial/SYN pre-filter (non-ironclad) before
  the full crypto handshake; silent hosts die in ~1 RTT
- AETHER_PROBE_JITTER_MS paces probe starts (default 0 = unchanged)
Nishef1 added a commit to Nishef1/Aether that referenced this pull request Sep 8, 2026
Bring the custom core fork onto the production v1.9.0 baseline used by Aether-GUI and include the bounded scanner improvements from upstream PR CluvexStudio#103. Core version remains independent from the GUI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant