Relay pairing offer v2 (E2EE) + host connections

This commit is contained in:
Mohamed Boudra
2026-02-04 22:53:00 +07:00
parent 9ce4ad9758
commit 0218729316
59 changed files with 2022 additions and 1547 deletions
+29
View File
@@ -0,0 +1,29 @@
import { createRelayServer } from "@paseo/relay/node";
const port = Number(process.env.PORT ?? "7778");
const host = process.env.HOST ?? "0.0.0.0";
async function main() {
const server = createRelayServer({ port, host });
await server.start();
console.log(`[relay-local] ready host=${host} port=${port}`);
const stop = async () => {
try {
await server.stop();
} finally {
process.exit(0);
}
};
process.on("SIGINT", stop);
process.on("SIGTERM", stop);
setInterval(() => {}, 1e9);
}
main().catch((e) => {
console.error(e);
process.exit(1);
});