Skip to content

Fix native HNS HTTPS redirects and DNSSEC-validated TLSA recovery - #28

Merged
shadstoneofficial merged 6 commits into
mainfrom
codex/hns-https-redirect-recovery
Oct 4, 2026
Merged

shadstoneofficial merged 6 commits into
mainfrom
codex/hns-https-redirect-recovery

Conversation

@shadstoneofficial

@shadstoneofficial shadstoneofficial commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes the blank / ERR_FAILED native HTTP-to-HTTPS navigation reported for handshake.mercenary. The upgraded website and matching TLSA are live; no production DNS or website changes are included.

  • Admit native HTTPS CONNECT tunnels through shared, authenticated DANE verification before forwarding TLS bytes.
  • Request DNSSEC AD + EDNS DO; require AD for positive/negative TLSA answers, preserve configured resolver order, isolate website/TLSA cooldowns, and retry temporary failures without manifest navigation.
  • Preserve original hostname, Host, SNI, path/query and same-native-host form POST/307/308 semantics; ignore stale homepage abort errors.
  • Add internal HTTPS status/Retry and bounded, cancellable certificate probes.
  • Prevent stale forced-refresh results and cross-port certificate-cache confusion.

Security limitation

Electron caches hostname-only certificate verification. A process-wide immutable SHA-256 fingerprint lock prevents different port/address certificates from becoming interchangeable. Legitimate certificate rotation requires fully quitting/reopening the browser; closing a Mac window or clearing resolver cache does not reset the lock. Distinct certificates on simultaneous ports of the same HNS hostname fail closed.

Initial verification (before provider/UI follow-up)

  • npm test: 191 passed, 0 failed/skipped
  • npm audit --audit-level=high: 0 vulnerabilities
  • git diff --check and public-repository hygiene scan: clean
  • Independent source review: no remaining actionable findings
  • Real Electron 42.11.3: all 17 critical fixture cases passed at 0223337, including direct/cold HTTPS, real POST 301/302/303/307/308, rejection, cross-port pinning and rapid startup
  • Immediate website-outage Retry recovered 115 ms after failure; TLSA outage Retry preserved native query/fragment
  • Both CI checks passed at 0223337; build agent independently confirmed all 191 source tests
  • Existing HeadlessDomains website-before-manifest, ordinary HNS/ICANN, direct manifest, Host/SNI tests remain green

Live acceptance blocker

A single cold native live navigation on 2026-10-04 at 03:20 UTC could resolve the A record, but all default TLSA providers failed: HNS DoH HTTP 403, Web3DNS invalid-service-name HTTP 400, Shakestation timeout. The patched browser correctly showed Native HTTPS temporarily unavailable; the updated live HTTPS site was NOT rendered or accepted. Two DNS-only regional endpoint checks also failed. No production DNS, defaults, user settings or certificate trust were changed during that historical live acceptance run. The later source-only defaults migration is documented below.

Keep this PR draft: qualify a reliable authenticated DNSSEC-validating resolver and rerun cold live acceptance before merge/build. Never bypass DANE authentication to pass. Exact source/runtime evidence and safe-failure outcomes are recorded in docs/hns-https-recovery-2026-10-04.md.

Known upstream limitation

Electron 42.11.3 native reload silently fails on completed POST pages. Reproduced on localhost; the upstream implementation documents the missing repost-confirmation path. This is separate from passing same-host POST submissions/307/308 redirects. No automatic form replay or global confirmation bypass is added. Publication needs an explicit decision on this remaining limitation.

Release gate

Draft for review. Do not publish older v0.1.25 assets as this fix. No release, app installation, system trust change or /Applications replacement performed. Signed-package acceptance is required before a new patch release. Full diagnosis, behavior matrix, and handoff are in docs/hns-https-recovery-2026-10-04.md.

Resolver provider and visibility follow-up — 85656f5

  • Permanently retire/ archive resolve.shakestation.io; filter its exact hostname from runtime candidates and migrate affected settings with a notice. Preserve custom order, JSON endpoints, disabled entries and explicit empty lists.
  • Active built-ins: HNS DoH, then binary Web3DNS at https://doh.web3dns.net/ (root path preserved). Legacy custom JSON configurations remain supported. No new infrastructure or IP pinning.
  • Add a clickable per-tab DNS badge with actual website and TLSA providers shown separately, sanitized endpoints/transports, fallback attempts, cache/admission reuse, cooldown and validation explanations.
  • Protect metadata against navigation, hostname/port, and same-host cross-tab races; do not infer a provider when ownership is ambiguous. Existing DANE trust enforcement remains unchanged.
  • Full npm test: 236 passed, zero failures/skips. npm audit --audit-level=high: zero vulnerabilities. Diff/hygiene checks: clean (64 files). Independent source review clear after regression fixes.
  • New adapter tests exercise Web3DNS descriptor-to-wire/parser path and AD=false rejection. Synthetic AD=true recovery is a fixture, not a live provider capability claim.
  • Exact-source Electron regression/visual acceptance requested separately; not yet accepted for this commit.

Live Web3DNS root-path probes at 03:59 UTC returned correct A/TLSA records but AD=false. The developer contact route and DNSSEC/AD contract remain unconfirmed; the inquiry in docs/resolver-provider-status.md is explicitly NOT SENT. Do not weaken authentication, merge, package, publish or install to bypass this gate. This source follow-up does not publish a release or change the installed app.

@shadstoneofficial
shadstoneofficial marked this pull request as ready for review October 4, 2026 12:53
@shadstoneofficial
shadstoneofficial merged commit c46bc75 into main Oct 4, 2026
2 checks passed
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.

2 participants