Updates
This commit is contained in:
@@ -229,7 +229,7 @@ Disable the unit for the next boot with **`~/.config/bare-os/initd/disabled.txt`
|
||||
- **Enable** — **On by default**. Disable with **`BARE_OS_WWW_INITD=0`** / **`false`** or **`systemctl disable bare-os-www`** (**`~/.config/bare-os/initd/disabled.txt`**).
|
||||
- **Env** — **`BARE_OS_WWW_PORT`** (default **8088**), **`BARE_OS_WWW_HOST`** (default **`127.0.0.1`**; use **`0.0.0.0`** only when you intend LAN exposure without Holesail). **`BARE_OS_WWW_HOLESAIL=0`** skips auto-merging the managed Holesail server entry (see below).
|
||||
- **Bootstrap** — If **`~/.www/index.html`** is missing or empty, the unit creates **`~/.www/`** and writes the stock landing page. The same **`ensureBareOsWwwHomeDefaults(ctx)`** helper runs after a successful **`login`**, **`login --new`**, or **`applyLoginKeys`** in **`identity-session.js`**, so operators often already have **`~/.www`** before initd starts.
|
||||
- **Holesail** — When managed **`bare-holesail`** is active, after **`listen`** succeeds the booter idempotently persists **`bare-www-<port>`** in **`~/.holesail/state.json`** as **`{ server: true, port, host: "127.0.0.1", enabled: true }`**. On first successful **`Holesail.ready()`**, the booter also writes **`key`** (**`hs://…`**) into that row when it was missing so the same tunnel URL survives reboot and login. **`holesail list`** shows the live tunnel.
|
||||
- **Holesail** — When managed **`bare-holesail`** is active, after **`listen`** succeeds the booter idempotently persists **`bare-www-<port>`** in **`/.bare/holesail/state.json`** (stock **`BARE_OS_HOLESAIL_STATE`**) as **`{ server: true, port, host: "127.0.0.1", enabled: true }`**. That path is **shared** between **guest** and **logged-in** sessions (VFS maps it to the personal drive root even when **`BARE_OS_PERSONAL_ACCT_PREFIX`** isolates other **`/.bare/**`** trees). On first successful **`Holesail.ready()`**, the booter also writes **`key`** (**`hs://…`**) into that row when it was missing. Legacy **`~/.holesail/state.json`** files are merged into the stable path on first read when the new file is empty. **`holesail list`** shows the live tunnel.
|
||||
- **Logs** — **`/var/log/bare-os/www.log`** (same personal-backed tree as other **`bare-os`** logs).
|
||||
- **VFS + HDMS** — When an HDMS mount with label **`www`** exists at **`/mnt/www`**, logical **`$HOME/.www`** and **`/home/<active>/.www`** route to that Hyperdrive root instead of the personal home tree (see [Chapter 5](05-identity-vault-and-hdms.md)). Without that mount, **`~/.www`** stays on the **personal** drive under the session home prefix.
|
||||
|
||||
@@ -242,7 +242,7 @@ Implementation: [`packages/bare-os-booter/lib/bare-os-www-initd.js`](../packages
|
||||
**`bare-holesail.js`** wires the upstream **`holesail`** package (**AGPL-3.0**) using **only** its public class API (no direct Hyperswarm / HyperDHT usage in this integration). Under **`pear run`**, the booter cannot bare-**`import('holesail')`** from **`pear:`** modules, so **`bare-holesail`** resolves the class from **`ctx.bare.holesail`** when the drive merge succeeded, else **`import.meta.resolve('holesail')`**, else a one-off eval of **`/lib/bare/bundles/holesail.js`** via **`ctx.vfs`** (same IIFE semantics as **`maybeMergeBareFromDrive`**).
|
||||
|
||||
- **Initd unit `bare-holesail`** — **On by default** ( **`BARE_OS_HOLESAIL_INITD=1`** and **`BARE_OS_HOLESAIL_MANAGED=1`** in stock **`shellEnv`** unless the host sets them empty or to **`0`/`false`**). Disable for a session with **`BARE_OS_HOLESAIL_INITD=0`** or **`systemctl disable bare-holesail`** ( **`~/.config/bare-os/initd/disabled.txt`**). Either **managed multi-tunnel** or **single env tunnel**:
|
||||
- **Managed (persisted list)** — Stock default (**`BARE_OS_HOLESAIL_MANAGED=1`**). Tunnel definitions live in **`BARE_OS_HOLESAIL_STATE`** (default **`~/.holesail/state.json`**, under the session **`$HOME`** on the personal drive). On unit start, every **enabled** entry gets its own **`holesail`** instance. Use guest **`/bin/holesail`** ( **`ctx.bareOsRunHolesailCli`**) to **`list`**, **`add`**, **`remove`**, **`start`**, **`stop`**, **`enable`**, **`disable`**, **`restart`**.
|
||||
- **Managed (persisted list)** — Stock default (**`BARE_OS_HOLESAIL_MANAGED=1`**). Tunnel definitions live in **`BARE_OS_HOLESAIL_STATE`** (default **`/.bare/holesail/state.json`** on the personal drive — same file for guest and unlocked **`$HOME`**). On unit start, every **enabled** entry gets its own **`holesail`** instance. Use guest **`/bin/holesail`** ( **`ctx.bareOsRunHolesailCli`**) to **`list`**, **`add`**, **`remove`**, **`start`**, **`stop`**, **`enable`**, **`disable`**, **`restart`**.
|
||||
- **Single tunnel** — Set **`BARE_OS_HOLESAIL_MANAGED=0`**, then exactly one of **`BARE_OS_HOLESAIL_SERVER=1`** or **`BARE_OS_HOLESAIL_CLIENT=1`**, **`BARE_OS_HOLESAIL_KEY=…`** when in client mode, and optional **`BARE_OS_HOLESAIL_SECURE`**, **`BARE_OS_HOLESAIL_PORT`**, **`BARE_OS_HOLESAIL_HOST`**, **`BARE_OS_HOLESAIL_UDP`**, **`BARE_OS_HOLESAIL_LOG`**.
|
||||
Starts after **`kernel-logger`** and **`bare-os-www`** by default (so **`bare-www-*`** server tunnels can reach the loopback HTTP listener). Logs: **`/var/log/bare-os/holesail.log`**. Example drop-in: **`/etc/bare-os/units/bare-holesail.unit.example`** on the system image.
|
||||
- **Early booter (“kernel-path”) instance** — Separate optional instance started **after** the **`repl`** boot phase and **before** **`startBareInitd`**. Enable with **`BARE_OS_HOLESAIL_KERNEL=1`** and the **`BARE_OS_HOLESAIL_KERNEL_*`** mirror of the options above (e.g. **`BARE_OS_HOLESAIL_KERNEL_SERVER=1`**). Uses **`registerKernelShutdownHook`** for teardown. **`hs.pause()` / `hs.resume()`** run on mobile suspend/resume hooks alongside other subsystems.
|
||||
|
||||
Reference in New Issue
Block a user