| … | … | @@ -48,6 +48,15 @@ npm install # hyperdht, b4a, hypercore-id-encoding, protomux, c |
| 48 | 48 | # requires `mosh` (mosh-server + mosh-client) installed on both ends |
| 49 | 49 | ``` |
| 50 | 50 | |
| 51 | **mosh is not bundled** — install it via your package manager (`apt install mosh`, |
| 52 | `brew install mosh`, …). On a minimal or locked-down target where the package |
| 53 | manager can't configure packages, extract the binaries straight from `.deb`s: |
| 54 | |
| 55 | ```sh |
| 56 | apt-get download mosh libprotobuf23 libssl3 libutempter0 |
| 57 | for d in *.deb; do dpkg-deb -x "$d" /; done && ldconfig |
| 58 | ``` |
| 59 | |
| 51 | 60 | Dual-runtime: Node and [Bare](https://github.com/holepunchto/bare) via the |
| 52 | 61 | `#node:*` import map (`dgram`→`bare-dgram`, `child_process`→`bare-subprocess`, …). |
| 53 | 62 | |
| … | … | @@ -83,6 +92,11 @@ hypermosh names # list known names |
| 83 | 92 | so mosh's earliest packets survive the DHT connect instead of being dropped. |
| 84 | 93 | - **Auto-reconnect = roaming.** On stream close the client redials the pubkey; mosh |
| 85 | 94 | resyncs the session across it. |
| 95 | - **Bare compatibility.** Node globals are *not* globals in Bare — each one |
| 96 | (`process`, `Buffer`, …) must be imported. This code imports `process` and routes |
| 97 | `fs`/`dgram`/`child_process`/etc. through the `#node:*` map, so it runs on Bare as |
| 98 | well as Node. If you add code touching a Node global directly, expect |
| 99 | `process is not defined` on Bare until you import it. |
| 86 | 100 | |
| 87 | 101 | ## Tests |
| 88 | 102 | |