← Commit history

bridge 0.0.21: bind ADOM_BIND_HOST (AD 1.9.63+ runtime contract, issue #61) - both loopback listeners

John Lauer ·794ac7c296 ·4mo ago ·parent 811c673
4 files changed +15−10
bridge/BRIDGE_VERSION+1−1
@@ -1 +1 @@-0.0.20\ No newline at end of file+0.0.21\ No newline at end of file
bridge/bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "native-browser",   "displayName": "Adom Native Browser (Chrome + Edge)",-  "version": "0.0.20",+  "version": "0.0.21",   "description": "Drives the user's REAL signed-in Chrome/Edge via an installed extension (native-messaging transport). Mirrors the puppeteer bridge's verb surface as nbrowser_* but runs inside the actual logged-in profile, so cookies/SSO/saved-logins/captcha human-trust all work. The bridge binds an ephemeral loopback port (PORTS.md compliant) and writes a discovery file; the native-messaging host pumps stdio <-> this bridge; the extension never touches a TCP port.",   "homepage": "https://wiki.adom.inc/adom/adom-browser-extension",   "author": "Adom Inc.",
bridge/server.js+7−2
@@ -777,6 +777,11 @@ function onHostFrame(frame) { } function resolve_ok(resolve, payload) { resolve({ success: true, output: JSON.stringify(payload) }); } +// Loopback bind host. AD (v1.9.63+) passes ADOM_BIND_HOST (always 127.0.0.1) to every bridge it+// spawns; bind to it so we never default to 0.0.0.0 and pop a Windows Firewall "allow access?"+// dialog. Both our listeners are loopback-only regardless.+const BIND = process.env.ADOM_BIND_HOST || '127.0.0.1';+ // ---- HTTP server for AD ---------------------------------------------------- const httpSrv = http.createServer((req, res) => {   const reply = (code, obj) => {@@ -891,14 +896,14 @@ function startHttp(p) {       process.stderr.write(`[native-browser] http listen error: ${e && e.code}\n`);     }   });-  httpSrv.listen(p, '127.0.0.1', () => {+  httpSrv.listen(p, BIND, () => {     const port = httpSrv.address().port;     if (hostSrv.listening) { // already came up on a prior attempt; just log the new http port       process.stdout.write(`[native-browser] bridge up: AD http :${port}  host tcp :${hostSrv.address().port}\n`);       return;     }     hostSrv.once('error', (e) => process.stderr.write(`[native-browser] host listen error: ${e && e.code}\n`));-    hostSrv.listen(0, '127.0.0.1', () => {+    hostSrv.listen(0, BIND, () => {       const hostPort = hostSrv.address().port;       writeHostFile(hostPort);       process.stdout.write(`[native-browser] bridge up: AD http :${port}  host tcp :${hostPort}\n`);
native-browser-bridge-manifest.json+6−6
@@ -1,8 +1,8 @@ {   "manifest_version": 1,-  "version": "0.0.20",-  "url": "native-browser-bridge-v0.0.20.bin",-  "sha256": "a65bff1def96ee414a323ed89469556e08fba7fa33f18e53ad675e403e4675fa",-  "size": 27940,-  "released_at": "2026-07-01T11:47:34Z"-}+  "version": "0.0.21",+  "url": "native-browser-bridge-v0.0.21.bin",+  "sha256": "c06bc4a0ab4dce3e485e3c7ea1cdb3b015e7df42a056fa5f8ea9a0778296a781",+  "size": 28083,+  "released_at": "2026-07-02T19:12:07Z"+}\ No newline at end of file