http server updates and docs
This commit is contained in:
@@ -17,6 +17,7 @@ Use when the user asks about **Holesail** in this repo: exposing TCP/UDP through
|
||||
1. **Integration** lives in **`packages/bare-os-booter/lib/bare-holesail.js`** (initd + optional early “kernel-path” instance) and **`packages/bare-os-booter/lib/holesail-cli.js`** (**`ctx.bareOsRunHolesailCli`** for **`/bin/holesail`**).
|
||||
2. **Resolution order** under **`pear run`**: the booter prefers **`ctx.bare.holesail`** ( **`/lib/bare/bundles/holesail.js`** after drive merge), else host **`import.meta.resolve('holesail')`**, else eval of the drive IIFE bundle via **`ctx.vfs`** — **`/bin`** and **`/boot/init.js`** are **not** Node modules, so scripts must not **`require('holesail')`**.
|
||||
3. **Stock default**: initd unit **`bare-holesail`** is **on** when **`BARE_OS_HOLESAIL_INITD`** and **`BARE_OS_HOLESAIL_MANAGED`** are left at defaults (**`1`** in stock **`shellEnv`** unless the host clears them). Disable with **`BARE_OS_HOLESAIL_INITD=0`** or **`systemctl disable bare-holesail`** (**`~/.config/bare-os/initd/disabled.txt`**).
|
||||
4. **`bare-os-www`** (**`packages/bare-os-booter/lib/bare-os-www-initd.js`**) serves **`~/.www`** on **`127.0.0.1:8088`** by default. **`bare-holesail`** starts **after** it in the initd DAG so the stock managed entry **`bare-www-<port>`** (**`server: true`**, **`host: 127.0.0.1`**, **`port`** from **`BARE_OS_WWW_PORT`**) can reach the HTTP listener. Opt out of auto-merge with **`BARE_OS_WWW_HOLESAIL=0`**. Handbook: **`handbook/04-the-booter-runtime.md`** § **bare-os-www** and § **bare-holesail**.
|
||||
|
||||
## Managed vs single-tunnel mode
|
||||
|
||||
@@ -34,7 +35,7 @@ From **`holesail-cli.js`** help text:
|
||||
- **`holesail add ID --server|--client`** with optional **`--key`**, bare **`hs://…`** token (no **`--key`** prefix), **`--port`**, **`--host`**, **`--udp`**, **`--secure` / `--no-secure`**, **`--log`**.
|
||||
- **`holesail remove ID`**, **`start|stop|restart ID`**, **`enable|disable ID`**.
|
||||
|
||||
Initd starts after **`kernel-logger`** by default. Logs: **`/var/log/bare-os/holesail.log`**. Example unit drop-in: **`/etc/bare-os/units/bare-holesail.unit.example`** on the system image.
|
||||
Managed **`bare-holesail`** starts after **`kernel-logger`** and **`bare-os-www`** by default. Logs: **`/var/log/bare-os/holesail.log`**. Example unit drop-in: **`/etc/bare-os/units/bare-holesail.unit.example`** on the system image.
|
||||
|
||||
## Debugging and safety
|
||||
|
||||
|
||||
Reference in New Issue
Block a user