pear-electron cannot load bare-tcp (require.addon) in the renderer. Use pear-run + workers/holesail-local.cjs so the actual holesail package runs under Bare; Node still loads holesail in-process. Add connect fallback modal with copy URL.
This commit is contained in:
+5
-1
@@ -81,7 +81,11 @@ npx holesail 'hs://s000…'
|
||||
## Implemented extensions
|
||||
|
||||
1. **Container UI action** — “Tunnel this port” on container details port table.
|
||||
2. **Client-side HolesailClient** — Pear binds a local port and opens the browser (`client/holesailLocal.js`, Tunnels → plug icon).
|
||||
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')`
|
||||
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