theseus/dev/registry-decide.mjs
Local Dev 7898e78ff4 Initial commit — Silent Mode baseline (2026-07-29)
Snapshot of the decentralized-web stack at the point of the resolver+Theseus
rebuild deploy. Includes:

- Argus (BNS engine + resolver daemon + Sia gateway)
- AriadneResolver (Windows Inno installer bundle + Android APK sources +
  Firefox extension)
- TheseusNavigator (Electron browser)
- site/ (silentmode.st content, deployed to Sia at bns/silentmode/)
- design docs, roadmap, protocol spec

Secrets excluded via .gitignore: Argus/sia-s3.json, Argus/wallets.json,
Argus/ca/*.key,*.crt. Build outputs, node_modules, and bundled runtimes
also excluded.

Shipped hashes on dl.silentmode.st at this commit:
  AriadneResolver-Setup-0.1.0.exe    5bcb216eef31ea28ed767e4134ab74bd5ac69dfbd365fd249e9e6938e55c986a
  TheseusNavigator-Setup-0.0.1.exe   7c735e88bad2da3347145adba3016c8f626a18b8422289c8c6ba471972e2952b
  TheseusNavigator-0.0.1-portable.exe 008fd84445babeabb401b2bca40ea9466b24b0e6d6c85104da7640c5c5c84521
  ariadne-v0.2.apk                   635c8f04d44ef855a8390b9eeddb8cd2d50622e81cc4e5004e8daffc1bb0425c
2026-07-29 13:54:34 +02:00

21 lines
1.1 KiB
JavaScript

// Daemon decision logic (favor-BCNR, detect ICANN conflict), tested against the
// real chain + real ICANN DNS. This is what bnsd.js would run per query.
import WebSocket from "ws";
import { resolveName } from "../../Argus/src/lib/resolver-web.js";
import { Resolver } from "node:dns/promises";
const icann = new Resolver(); icann.setServers(["1.1.1.1"]); // bypass local NRPT
async function decide(name) {
const [bcnr, ip] = await Promise.all([
resolveName(name, { WebSocket }).catch(() => null),
icann.resolve4(name).then(a => a[0]).catch(() => null),
]);
let d;
if (bcnr && ip) d = "CONFLICT → ask user (BCNR vs ICANN)";
else if (bcnr) d = "serve BCNR (favored; no ICANN entry)";
else if (ip) d = `forward ICANN (${ip})`;
else d = "NXDOMAIN (neither root has it)";
console.log(`${name.padEnd(16)} BCNR=${bcnr ? "yes[" + Object.keys(bcnr.records) + "]" : "no ".padEnd(3)} ICANN=${(ip||"no").padEnd(15)} -> ${d}`);
}
const names = process.argv.slice(2).length ? process.argv.slice(2) : ["syskypo.de","google.de","go.dev","nothing-xyz.de"];
for (const n of names) await decide(n);
process.exit(0);