pear-run worker RPC timed out from the Electron UI. Run real holesail in Bare index.js (holesailBareControl) and have the UI call localhost HTTP instead of loading bare-tcp in the renderer.
This commit is contained in:
+5
-4
@@ -82,10 +82,11 @@ npx holesail 'hs://s000…'
|
||||
|
||||
1. **Container UI action** — “Tunnel this port” on container details port table.
|
||||
2. **Client-side local proxy** — Tunnels → plug icon runs the **real `holesail` package**.
|
||||
Under pear-electron the UI renderer cannot load bare-tcp (`require.addon is not a function`). Holepunch’s pattern is a **Bare worker**:
|
||||
- UI: `client/holesailLocal.js` → `pear-run('./workers/holesail-local.cjs')` over pear-pipe
|
||||
- Worker (Bare): `require('holesail')` with full `require.addon`
|
||||
- Node tests / non-Pear: in-process `require('holesail')` / `import('holesail')`
|
||||
Under pear-electron the UI renderer cannot load bare-tcp (`require.addon is not a function`). Real holesail runs in the **Bare main process**:
|
||||
- Bare entry `index.js` starts `client/holesailBareControl.cjs` (`require('holesail')`) on `http://127.0.0.1:<port>`
|
||||
- Endpoint + token written to `<Pear.config.storage>/peardock-holesail-local.json`
|
||||
- UI `client/holesailLocal.js` POSTs `/connect` / `/disconnect` (never loads bare-tcp)
|
||||
- Node tests / non-Pear: in-process `require('holesail')`
|
||||
3. **Persist tunnel definitions** — `peardock-tunnels.json` (mode 600); restored on server boot with the same `hs://` keys when possible.
|
||||
|
||||
## Optional later
|
||||
|
||||
Reference in New Issue
Block a user