argus/src
Local Dev 47601fcbdb gateway+Theseus: pin BNS ip-record fetch to on-chain tls fingerprint
Uncovered by the 2026-08-13 subdomain-inheritance fix: once
`checkers.game.x` correctly picked the parent's `ip` record instead of
`s3`, the ip branch itself failed. Two reasons:

  1. `fetch("http://<ip>/", { headers: { host: name } })` follows the
     site's :80→:443 redirect into `https://<name>.<tld>/`, which isn't
     in ICANN DNS → "fetch failed".
  2. The site's cert is signed by a per-machine BNS root, not a public
     CA; standard TLS validation rejects it.

Both are fixed by connecting to the IP with SNI = name, pinning the
presented cert's SHA-256 against the on-chain `tls` record, and only
then issuing the HTTPS request over the same socket. The on-chain
fingerprint is the trust anchor BNS uses everywhere else (see
Argus/src/lib/ca.js).

Gateway (public-gateway.mjs): new pinnedHttpsGet + httpGet + ipRequest
helpers; case "ip" delegates. No silent HTTP fallback on pin failure
(a mismatch means "not the site the chain says it is").

Theseus (main.js): parallel port of the same helpers, Tor-aware
(routes through SocksProxyAgent when Tor is on). serveBns's inner
serveIp() delegates to ipRequest.

Verified live: `curl -sI https://navigate.st/bns/checkers.game.x/`
returns 200 OK with the checkers game (1,179,215 bytes, apex
`game.x` unchanged, served from Sia).
2026-08-16 20:28:58 +02:00
..
daemon resolver: echo EDNS OPT record so strict clients stop failing 2026-08-02 01:19:09 +02:00
gateway gateway+Theseus: pin BNS ip-record fetch to on-chain tls fingerprint 2026-08-16 20:28:58 +02:00
indexer Collision modes (BCNR/ICANN) + root TLD cert + VPS electrum-source indexer 2026-08-02 11:39:00 +02:00
lib Snapshot in-progress work: Ariadne mobile, Theseus password manager, Hephaestus 2026-08-14 23:17:18 +02:00
web Initial commit — Silent Mode baseline (2026-07-29) 2026-07-29 13:54:34 +02:00
config.js Initial commit — Silent Mode baseline (2026-07-29) 2026-07-29 13:54:34 +02:00
register.js Initial commit — Silent Mode baseline (2026-07-29) 2026-07-29 13:54:34 +02:00
registrar-config.js Initial commit — Silent Mode baseline (2026-07-29) 2026-07-29 13:54:34 +02:00
resolve.js Theseus navigator UI overhaul, BNS-only indexer, site restructure 2026-07-30 08:16:55 +02:00
update.js Initial commit — Silent Mode baseline (2026-07-29) 2026-07-29 13:54:34 +02:00
wallet-app.js Initial commit — Silent Mode baseline (2026-07-29) 2026-07-29 13:54:34 +02:00