OverviewFilesCommitsIssuesDocsReleasesPeers

p2p-bridge commits / bbd072e

README: the repo had none
Commands, options and the derivation chain all come from bridge.js -- the usage text and the header comment. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
bbd072e488745d246872461c00d7128b988ec67a
by plankatron <fleeky@gmail.com> · 2026-09-10T15:44:15.000Z

Changed files (1) +80 -0

README.md +80 -0
……@@ -0,0 +1,80 @@
1# p2p-bridge
2
3CogServer over Hyperswarm — reach a remote [AtomSpace](../repos/atomspace) as if it were on
4localhost, with no port forwarding, no static IP and no key exchange.
5
6```
7CogStorageNode ─TCP─► bridge client ─Hyperswarm─► bridge server ─TCP─► CogServer
8```
9
10Package name is `atomspace-p2p-bridge`; the binary is `atomspace-bridge`.
11
12## Identity-first: both sides derive the same topic
13
14There is no key to copy between machines. Both ends name the same
15[hyperident](../../hyper-fleeky/hyperident) profile and arrive at the same DHT topic:
16
17```
18hyperident mnemonic → SLIP-21(profileName) → seed
19seed + "atomspace-bridge" salt → Ed25519 keypair
20discoveryKey(publicKey) → DHT topic
21```
22
23## Usage
24
25```sh
26# on the CogServer machine
27node bridge.js server --profile tabertron
28
29# anywhere else
30node bridge.js client --profile tabertron
31```
32
33Then in Guile:
34
35```scheme
36(define csn (CogStorageNode "cog://localhost:17002/"))
37(cog-open csn)
38```
39
40Without hyperident, fall back to raw keys:
41
42```sh
43node bridge.js server --seed <64-hex-chars>
44node bridge.js client <public-key>
45```
46
47## Options
48
49**Identity — pick one**
50
51| | |
52|---|---|
53| `--profile <name>` | hyperident profile (recommended) |
54| `--seed <hex>` | raw 64-char hex seed |
55
56**Server**
57
58| | |
59|---|---|
60| `--port <n>` | CogServer port (default `17001`) |
61| `--testnet <file>` | use a local testnet |
62
63**Client**
64
65| | |
66|---|---|
67| `--proxy-port <n>` | local proxy port (default `17002`) |
68| `--testnet <file>` | must match the server's |
69
70## Notes
71
72- `hyperident` is ESM and loaded dynamically; if it is absent the bridge still runs, but only
73 the `--seed` / explicit-pubkey path works.
74- Transport is Protomux over a Hyperswarm connection, protocol `atomspace-proxy`.
75- `test-bridge.js`, `test-connect.js` and `test-production-dht.js` are scripts, not a suite —
76 run them directly.
77
78## License
79
80Not yet declared.