johnandersen777.bsky.social/atlibs-iroh
iroh transport for atlibs hosts: com.fedfork.exec.iroh.connect in Rust (atlibs-host) and JavaScript
0
0
// Test stand-in for `socialweb-guest-agent relay <unix-socket>` (fake-bin/ssh and the loopback test run it):
// stdin/stdout <-> the socket, raw bytes; exits when the socket closes.
import { connect } from "node:net";
const socket = connect(process.argv[2]);
process.stdin.pipe(socket);
socket.pipe(process.stdout);
socket.on("close", () => process.stdin.destroy());
socket.on("error", (error) => (console.error(`relay: ${error.message}`), (process.exitCode = 1)));