Commit Graph
66 Commits
Author SHA1 Message Date
Raven Scott 3d70f322cc test updates
CI / Build & Test (push) Successful in 4m5s
2026-03-15 06:00:44 -04:00
Raven Scott db7bf8c864 fix(sync): persist and cache device names so they are never lost
CI / Build & Test (push) Successful in 4m18s
- state.js: add lastLoadedDeviceNames cache, getDeviceNames(),
  setDeviceNames(); saveStateSync() always merges and writes
  deviceNames so saves never strip them.
- holesail-manager: include deviceNames in saveState() and
  getStateSnapshot(); applySnapshotData() updates cache from
  synced snapshot. buildDefaultState and legacy migration
  include deviceNames: {}.
Prevents hostnames reverting to "Device 1" etc. after saves or sync.
2026-03-15 05:33:08 -04:00
Raven Scott f1fbc6f01f fix(sync): keep autopass writable after native-host restart
CI / Build & Test (push) Has been cancelled
When reopening with existing identity, do not pass discovery key to
Autopass. That makes Autobase bootstrap from this device's local core
(name: 'local') instead of bootstrap.getUserData('autobase/local'),
which can point at another device's writer and open it read-only.
2026-03-15 05:22:21 -04:00
Raven Scott 44aebc49a0 Sync: generate a new invite each time; call deleteInvite before createInvite when linked
CI / Build & Test (push) Successful in 4m6s
2026-03-15 04:01:49 -04:00
Raven Scott 1d9bf22439 Sync: Master model and same-group invites
CI / Build & Test (push) Successful in 4m15s
- Device that creates sync group is the Master; MASTER label in Linked devices table
- Create invite when already linked generates invite for same sync group (no wipe)
- Any peer can create invites so devices can be added when Master is offline
- Identity file stores isMaster; same sync group reused across native host restarts
- Update SYNC.md, NATIVE-HOST.md, ARCHITECTURE.md, CHANGELOG.md
2026-03-15 03:48:20 -04:00
Raven Scott 0f4b82681d Apply sync incrementally so unchanged tunnels stay running
CI / Build & Test (push) Successful in 4m21s
- Add getStateSnapshot, applySnapshotData, setStateSaveSuppressed to holesail-manager
- Sync diffs snapshot vs current state and only removes/adds/updates changed tunnels
- Suppress saves during apply and write state.json once at the end
- Fall back to full cleanup + restore when incremental APIs are unavailable
2026-03-15 03:28:47 -04:00
Raven Scott cce71920e9 fix(backup): exclude autopass dir from backup, remove after restore
CI / Build & Test (push) Has been cancelled
- Backup: do not include autopass/ (may be in use); always include
  autopass-identity.json so sync identity is never lost
- Restore: remove autopass/ after extract so autopass can recreate from
  restored identity
- Docs: BACKUP.md, SYNC.md, ARCHITECTURE.md updated
2026-03-15 03:25:07 -04:00
Raven Scott 80f31e13af fix(sync): use autopass API correctly in pair and create paths
CI / Build & Test (push) Successful in 4m17s
- pairWithInvite: await store.ready() before pair; await pass.ready()
  after pair.finished(); on error call pair.close() then closePass()
- createSyncInvite: on error await closePass() instead of nulling refs
2026-03-15 02:56:20 -04:00
Raven Scott 1eaa6e21ba fix(sync): autopass device-file on restart and new invite
CI / Build & Test (push) Successful in 4m46s
- Remove autopass dir before createSyncInvite/pairWithInvite so Corestore
  gets a fresh device-file (device-file throws when inode/mtime changes)
- Await sync/rdp/holesail cleanup on host shutdown so corestore closes
  before process exit
- Reset initPromise on init failure so Create invite can retry after
  removing corrupt autopass dir
2026-03-15 02:50:53 -04:00
Raven Scott 7d88cdf841 feat(sync): publish hostname and quiesce sync for backup
CI / Build & Test (push) Successful in 4m20s
- getSyncStatus: fire-and-forget push device hostname when missing so
  linked peers see names after opening Sync page
- Backup/restore: close sync (corestore) before copy/extract so autopass
  data is consistent; backup includes autopass/ and autopass-identity.json
- Installer: preserve sync data on re-run (comments and messages)
- Docs: BACKUP.md sync-in-backup and pause behaviour; SYNC.md backups
  include sync data
2026-03-15 02:34:44 -04:00
Raven Scott 7df3975bb0 feat(sync): show device hostnames in Linked devices table; document sync fully
CI / Build & Test (push) Successful in 4m20s
- Sync: use OS hostname for each device in Linked devices table; persist
  deviceNames in state and merge on save/apply so peers see each other's names
- Docs: expand SYNC.md (linked devices table, replace-state modal, multi-device,
  offline); NATIVE-HOST getSyncStatus (deviceId, syncGroupId, linkedDevices,
  deviceName/name); ARCHITECTURE sync-manager and autopass paths; README
  features/dashboard/file locations/doc link; BACKUP and SECURITY cross-refs
2026-03-15 02:22:11 -04:00
Raven Scott 90613511ed feat(sync): list all linked devices in Sync table
CI / Build & Test (push) Successful in 4m25s
- getSyncStatus() now iterates pass.base.activeWriters and returns
  linkedDevices: [{ id, isCurrent }] for each writer in the sync group
- Dashboard Linked devices table shows every device: "This device" plus
  "Device 2", "Device 3", etc. with their IDs; rows sorted by id
- Fallback to single "This device" row when activeWriters is missing
2026-03-15 02:03:37 -04:00
Raven Scott 925376a6bd fix(sync): stop sync loop; add link warning and linked-devices table
CI / Build & Test (push) Successful in 4m22s
- Await restorePersistedTunnels so applyingSync stays true for full restore,
  preventing saveState() during tunnel startup from pushing back and looping
- Debounce onRemoteUpdate (600ms) and skip apply when state unchanged
  (canonical fingerprint) to avoid redundant restarts
- Add confirm modal before "Link device": warns that current state will be
  replaced and suggests creating a backup first
- Add Linked devices table when linked: show This device ID (writerKey) and
  Sync group ID (discoveryKey); getSyncStatus returns deviceId and syncGroupId
2026-03-15 01:47:34 -04:00
Raven Scott 33ea92cd43 fix(sync): stop sync loop and apply remote state once
CI / Build & Test (push) Has been cancelled
- Await restorePersistedTunnels in applySyncedState so applyingSync stays
  true for the full restore. Prevents saveState() during tunnel startup
  from pushing back to autopass and causing a feedback loop.
- Debounce onRemoteUpdate (600ms) so bursts of autopass 'update' events
  trigger a single apply.
- Skip apply when remote state matches current state (canonical fingerprint)
  to avoid redundant restarts and re-pushes.
- Clear remoteUpdateDebounceTimer in cleanup().
2026-03-15 01:44:46 -04:00
Raven Scott 2595a01f65 feat: autopass-based cross-device sync for Holesail Browser
CI / Build & Test (push) Successful in 4m27s
- Native host: add autopass + corestore deps, sync-manager (createInvite, pairWithInvite, push/pull)
- Apply synced state via same flow as backup restore (state.json only, no certs)
- Holesail-manager: setOnStateSaved hook for sync push
- Extension: Sync dashboard page, getSyncStatus/createSyncInvite/pairWithInvite, syncApplied event
- Docs: NATIVE-HOST.md sync commands, SYNC.md
2026-03-15 01:31:51 -04:00
Raven Scott 6fcd9fcf2b eat: implement Holesail-Browser enhancement plan
CI / Build & Test (push) Successful in 3m19s
- Add unit tests (hostname-validator, TLDs, payload-schemas) and integration tests for message handler registry
- Refactor native host message router into handler registry (handlers/state, tunnels, ssh, rdp, backup, ca, connections)
- Add ESLint config and npm test + lint steps in CI
- Dashboard: visibility-based refresh pause, configurable refresh interval (2s/5s/10s/paused)
- Accessibility: ARIA on nav and modals, focus trap and restore, prefers-reduced-motion
- Empty states: primary action buttons for virtual hosts, servers, service tunnels
- Native host rate limiting for backup and CA operations; update SECURITY.md
- CONTRIBUTING: "Adding a new dashboard page", dev workflow; add npm run dev script
2026-03-15 00:24:31 -04:00
Raven Scott 609f5d9353 feat(native-host): kill previous instance on startup and in installers
CI / Build & Test (push) Successful in 3m20s
- Add kill-previous-instance.mjs with PID lock file under BASE_DIR; on
  startup send SIGTERM to any existing native-host before binding ports
- Register removePidFile on shutdown and exit
- Run "stop any running native host" at the start of install.sh and
  install.ps1
- Use ESM with static imports so bare-pack includes the module in the
  bundle (dynamic require was not included and broke the built binary)
- Add kill-previous-instance.mjs to CI syntax check
2026-03-14 23:31:34 -04:00
Raven Scott 3bf9851390 feat(native-host): kill previous instance on startup and in installers
CI / Build & Test (push) Failing after 3m39s
- Add kill-previous-instance.js with PID lock file under BASE_DIR
- On startup, send SIGTERM to any existing native-host process before binding ports
- Register removePidFile on shutdown and exit so the lock is cleared
- Run "stop any running native host" at the start of install.sh and install.ps1
- Add kill-previous-instance.js to CI syntax check
2026-03-14 23:22:43 -04:00
Raven Scott 9756048636 attempted fix
CI / Build & Test (push) Successful in 3m48s
2026-03-06 21:03:12 -05:00
Raven Scott b54e19dc7d tests
CI / Build & Test (push) Successful in 3m40s
2026-03-06 20:56:51 -05:00
Your Name 1ccd509217 get windows running
CI / Build & Test (push) Has been cancelled
2026-03-06 17:17:35 -08:00
Raven Scott 0e0822aa81 - Build: explicitly write tt-native package.json into the bundle in
CI / Build & Test (push) Successful in 3m47s
patchBundle so the runtime never gets empty content for that key
  (fixes "Unexpected end of JSON input" in Module._extensions..json
  when the host is started by the extension on Windows).
- State: treat empty or whitespace-only state.json (and legacy
  persist file) as missing and return default state instead of
  throwing in JSON.parse.
- State: add ensureStorageDir() and call it from message-router
  after setStoragePath so the storage directory exists on fresh
  install before any state is loaded or saved.
2026-03-06 18:51:53 -05:00
Raven Scott fa9026c481 se pkexec for Linux CA install to show GUI password prompt
CI / Build & Test (push) Successful in 3m37s
- Replace sudo with pkexec so PolicyKit shows a graphical auth dialog
  when the native host is launched by the browser (no terminal).
- Pass DISPLAY and XAUTHORITY into the pkexec env so the polkit
  agent can display the dialog in the current session.
- Keep copy + update-ca-certificates in a single pkexec sh -c for
  one password prompt.
- Update SECURITY.md and JSDoc to describe pkexec / PolicyKit.
2026-03-06 17:59:34 -05:00
Raven Scott ab2ead81c7 Remove test dir, remove releases dir, adds dev releases to ignore.
CI / Build & Test (push) Successful in 3m54s
2026-03-04 01:53:23 -05:00
Raven Scott 80759f8b0c chore(native-host): group modules into proxy/, managers/, host/
CI / Build & Test (push) Successful in 3m12s
- Move connect-proxy and https-proxy into proxy/
- Move certificate-authority, backup-manager, ssh-manager, rdp-manager into managers/
- Move messenger.js into host/
- Move test-dirname.cjs into test/
- Update imports, CI lint paths, and ARCHITECTURE.md
2026-03-03 23:53:51 -05:00
Raven Scott 6c981f708f Remove native-host shims (host.js, holesail-manager.js)
CI / Build & Test (push) Successful in 3m10s
- Import host/message-router.js and holesail-manager/index.js directly
- Delete host.js and holesail-manager.js
- Drop shim entries from CI syntax checks
- Update ARCHITECTURE.md diagram and file table
2026-03-03 23:43:40 -05:00
Raven Scott 3a13334779 feat(virtual-hosts): add TLS option for HTTPS/443 backends
CI / Build & Test (push) Failing after 2m44s
- Add "Use TLS (secure connection)" checkbox in Add Virtual Host modal
- Persist and restore useTls in state; show TLS badge in table
- When enabled, HTTPS proxy connects to tunnel backend over TLS (SNI =
  hostname) for HTTP and WebSocket; supports services on port 443
2026-03-03 03:59:53 -05:00
Raven Scott e18ad5109e Convert license to AGPLV3
CI / Build & Test (push) Successful in 3m8s
2026-03-02 16:35:53 -05:00
Raven Scott 21b01f1461 revert: remove Statistics tab and all associated changes
CI / Build & Test (push) Successful in 3m7s
2026-03-01 23:07:55 -05:00
Raven Scott f9c651c6f5 fix: guard against non-array os.loadavg() in stats page
CI / Build & Test (push) Successful in 3m9s
Normalize loadAvg to [0,0,0] fallback in both the native host handler
and the dashboard renderer to prevent TypeError when bare-node-os returns
a non-array value for loadavg().
2026-03-01 22:43:56 -05:00
Raven Scott 98ecb695f4 dd Statistics tab with real-time native host monitoring
CI / Build & Test (push) Successful in 2m55s
- Add getProcessStats message handler to native host returning process
  memory (rss, heap used/total, external), PID, uptime, OS memory,
  CPU load averages, core count, platform/arch, and tunnel state counts
- Add stats-tracker.js to background SW tracking cumulative connections,
  reconnect count, last disconnect time, and per-minute connection rate
  ring buffer (30 buckets) for sparkline display
- Include statsHistory and activeConnections array in all getState responses
- Add Statistics dashboard page with six sections: Native Host Process,
  System Resources, Tunnel Health, Proxy Traffic, Peer Connections
  (with SVG sparkline), and Extension & Proxy Info
- Preserve checkbox selection across table re-renders on all bulk-action
  tables (virtual hosts, servers, service tunnels)
- Add theme-aware custom checkbox styling for bulk selection rows using
  design system tokens, with white checkmark override for light theme
2026-03-01 22:35:56 -05:00
Raven Scott 440fbf350e fix(ssh): add keyboard-interactive auth and fix SSH_ASKPASS scoping
CI / Build & Test (push) Successful in 2m50s
Most modern SSH servers disable plain password auth and only allow
keyboard-interactive. Excluding it from PreferredAuthentications caused
SSH to exhaust all auth methods and exit immediately.

Also scope SSH_ASKPASS_REQUIRE=force to only apply when a saved password
is provided. Setting it unconditionally broke keyboard-interactive auth
since that method ignores SSH_ASKPASS and reads from the PTY directly.
2026-03-01 11:21:45 -05:00
Raven Scott f069058c98 evert: remove experimental my.dash.board PWA virtual host
CI / Build & Test (push) Successful in 2m52s
Reverts the experimental feature that attempted to serve the dashboard
via a local HTTP server registered as a hardcoded `my.dash.board` virtual
host, intended to satisfy Chrome's PWA "secure origin" installability
requirement. The approach caused proxy connection errors and file-not-found
issues that were not worth resolving.

Removed: native-host/dashboard-server.js, native-host/test-chain.mjs
Reverted: startup.js, message-router.js, virtual-hosts.js, index.js,
          build-distributable.js, extension/pages/virtual-hosts.js,
          CI workflows (ci.yml, release.yml)
2026-03-01 04:00:29 -05:00
Raven Scott b9d53fa725 debug and ci
CI / Build & Test (push) Has been cancelled
2026-03-01 03:46:39 -05:00
Raven Scott 04317507eb test
CI / Build & Test (push) Successful in 3m54s
2026-03-01 03:36:03 -05:00
Raven Scott 6181cde033 fix(pwa): fix connection reset by correcting bare-http1 ServerConnection usage
CI / Build & Test (push) Successful in 2m48s
Pass a proper EventEmitter as the server argument to bare-http1
ServerConnection in dashboard-server.js. The constructor signature is
(server, socket, opts) — passing the socket as the first argument caused
immediate connection resets because ServerConnection emitted 'request' on
the socket object instead of a handler, silently dropping all requests.
2026-03-01 03:22:09 -05:00
Raven Scott e6658d4421 fix(pwa): resolve proxy connection reset and manifest same-origin warnings
CI / Build & Test (push) Successful in 2m47s
Fix "Proxy error: connection reset by peer" caused by dashboard-server.js
looking for files in native-host/ instead of extension/dashboard/. Remove
the devBasePath parameter and resolve DEV_DASHBOARD_DIR directly from
__dirname so dev and distribution mode both find the correct files.

Fix all manifest warnings (start_url/id/scope/protocol_handlers ignored)
by reverting manifest.webmanifest to relative/extension-origin URLs for
the chrome-extension:// context, and having dashboard-server.js dynamically
generate a manifest at /manifest.webmanifest with absolute
https://my.dash.board/ URLs — satisfying Chrome's same-origin requirement
for PWA installability.

Also serve extension icons at https://my.dash.board/icons/<file> with
correct bundle key mapping, and embed them in the distributable binary
via build-distributable.js.
2026-03-01 03:10:11 -05:00
Raven Scott a838c3a345 feat(pwa): experimental — add my.dash.board virtual host for secure PWA install
CI / Build & Test (push) Successful in 2m51s
Serve the dashboard over a local HTTPS virtual host (my.dash.board) so
Chrome treats it as a secure origin and shows the PWA install prompt.

- Add native-host/dashboard-server.js: bare-http1 static file server
  backed by bare-bundle assets in distribution mode, disk fallback in dev
- Add setLocalVirtualHost() to virtual-hosts.js; type:local entries are
  protected from removal and filtered out of saveState persistence
- Export setLocalVirtualHost from holesail-manager/index.js
- Start dashboard server in startup.js after proxies are ready and
  register my.dash.board as a local virtual host
- Stop dashboard server in message-router.js cleanup()
- Update manifest.webmanifest: start_url, id, scope → https://my.dash.board/
- Embed all extension/dashboard/ files as bare-bundle assets in
  build-distributable.js patchBundle() — no installer copy step needed
- Hide checkbox, hs:// URL, Reconnect, and Remove controls for built-in
  my.dash.board row in the virtual hosts table UI
2026-03-01 02:58:52 -05:00
Raven Scott 32cd108480 fix(settings): fix latency ping and tunnel auto-reconnect defaults
CI / Build & Test (push) Successful in 2m54s
- Default latencyPingEnabled to false so badges are hidden until opted in
- Fix toggleLatencyPing sync condition from !== false to === true to match
  the new default correctly
- Default tunnelAutoReconnect to true so tunnels reconnect automatically
  out of the box
- Hide latency badges in virtual hosts and service tunnels tables when
  latency ping is disabled
2026-03-01 01:10:59 -05:00
Raven Scott 10ac56438f fix(settings): persist latencyPing settings through native host round-trip
CI / Build & Test (push) Successful in 2m54s
Add latencyPingEnabled and latencyPingIntervalMs to the native host
SETTINGS_DEFAULTS and updateSettings handler so they are persisted to
state.json and returned in the save response. Previously these fields
were extension-only and were silently dropped, causing the UI to revert
to defaults after every save.
2026-03-01 01:02:47 -05:00
Raven Scott f1e98a7edd docs: add CONTRIBUTING.md, CHANGELOG.md, and JSDoc to entire codebase
CI / Build & Test (push) Successful in 2m54s
Add docs/CONTRIBUTING.md covering the build system, dev workflow, all
npm scripts, how to add new native host message types, code style, and
debugging guidance.

Add CHANGELOG.md at the project root documenting all features and fixes
across the 1.0.0 release.

Add JSDoc (@param, @returns) to all previously undocumented exported
functions across 35 JS files:
- native-host/holesail-manager/ (index, virtual-hosts, service-tunnels,
  servers, port-allocator)
- native-host top-level managers (startup, connect-proxy, https-proxy,
  certificate-authority, ssh-manager, rdp-manager)
- extension/background/ (logs, native-messaging, proxy, message-router)
- extension/dashboard/core/ (utils, navigation, init)
- extension/dashboard/ui/ (modal, toast, state-tag)
- extension/dashboard/pages/ (all 10 page files)
- extension/dashboard/refresh.js, events.js
- extension/dashboard/data/hostname-validator.js
- scripts/ (build-host, run-install)
2026-03-01 00:40:53 -05:00
Raven Scott 0b31e7faa6 fix: resolve 35 memory leaks, resource leaks, and bugs across native host and extension
CI / Build & Test (push) Successful in 2m52s
CRITICAL:
- certificate-authority.js: declare `regenerated` variable in installRootCA Windows path to prevent ReferenceError crash

HIGH:
- virtual-hosts.js/service-tunnels.js: call hs.removeAllListeners() in catch blocks to prevent stale listeners on failed Holesail instances
- https-proxy.js: destroy rawSocket in TLS error handler to prevent file descriptor exhaustion
- message-router.js (native): move setEventEmitter() to module-level init instead of re-calling on every message
- ssh-manager.js: add error handler to WS server to prevent unhandled error crashes
- init.js: store setInterval ID and clear on beforeunload to prevent interval accumulation
- logs.js: store and remove chrome.runtime.onMessage listener on beforeunload; add duplicate-call guard
- events.js: move pending++ before async sendMessage call to fix SSH/RDP-only import showing "Nothing to import"
- ssh.js: store resizeTimer on activeSshSession and clear in disconnectSsh; fix auto-reconnect race with _sshConnecting lock
- native-messaging.js: track retry timer IDs in array and cancel all on disconnect
- rdp.js: reuse single offscreen canvas per session instead of allocating per bitmap

MEDIUM:
- virtual-hosts.js/service-tunnels.js: clear existing.reconnectTimer before replacing tunnel entries
- message-router.js (native): destroy pingTunnel socket on error path; clear 15s fallback timer via finally()
- startup.js: wrap setImmediate body in try/finally to always resolve proxiesReadyPromise
- https-proxy.js: fix pre-connect upstream error handler to avoid writing raw HTTP into piped TLS stream; move HOP_BY_HOP to module-level constant
- connect-proxy.js: destroy upstreamSocket on clientSocket close; track and destroy active sockets in stop()
- ssh-manager.js: call cancelPasswordWatch on WS disconnect during password collection
- rdp-manager.js: remove dead remotePort variable; add error handlers to both WS servers
- backup-manager.js: log cleanupStaging errors and non-zero exit codes
- rdp.js: null out ws callbacks before closing in disconnectRdp; disconnect MutationObserver on beforeunload
- proxy-ca.js: prune stale entries from validationResults Map in renderValidatorTable
- refresh.js: deduplicate in-flight pings per port via Set
- messaging.js: read chrome.runtime.lastError in sendToNative callback
- servers.js (dashboard): add null check for $('serverEditId') element

LOW:
- port-allocator.js: add dedup check before pushing to tunnelPortFreeList
- servers.js (native): add error listener to server-mode Holesail instances
- virtual-hosts.js: remove dead prevReconnectDelay variable
- tab-lifecycle.js: change swarmRefCount fallback from || 1 to || 0 to prevent premature swarm destroy
- ssh.js/rdp.js: disconnect MutationObservers on beforeunload
2026-03-01 00:10:20 -05:00
Raven Scott 849897f324 feat: implement 13 features — auto-reconnect, notifications, bulk actions, latency, traffic, theme, export/import, scheduled backups, peer lookup, SSH auto-reconnect, log filters, keyboard shortcut, and readyTimeout default
CI / Build & Test (push) Successful in 2m44s
- Change readyTimeoutMs default from 0 to 30000 in both state files
- Register Alt+Shift+H keyboard shortcut via manifest _execute_action command
- Add severity filter buttons (All/Info/Warn/Error) and Download .txt to Logs page; background logs.js now tags entries with proper level field
- Fire browser notifications on tunnelError events (notifyOnTunnelError setting)
- Add exponential-backoff auto-reconnect for virtual hosts and service tunnels (tunnelAutoReconnect setting, 5s–120s backoff)
- Add backupIntervalHours setting and scheduled auto-backup timer in message-router.js
- Add TCP connect latency badges to Virtual Hosts and Service Tunnels tables via new pingTunnel native message
- Add bytesIn/bytesOut/requests counters to https-proxy.js; expose in Overview status bar via getState
- Add Export/Import connection configs (JSON, no CA key) in Settings
- Add autoReconnect flag and exponential-backoff reconnect to SSH connection cards
- Add light theme CSS variables and theme toggle in Settings (persisted to localStorage)
- Add checkbox column and bulk Stop/Remove actions to Virtual Hosts, Service Tunnels, and Servers tables
- Add Peer Lookup UI card on Overview page using existing lookup message handler
2026-02-28 23:51:14 -05:00
Raven Scott 31f30b2974 fix: resolve 14 memory leaks and bugs across native host and extension
CI / Build & Test (push) Successful in 2m47s
Critical:
- ssh-manager: release ports/wsServer/holesail on ptySpawn failure
- rdp-manager: add 30s timeout to holesailInst.ready() to prevent infinite hang

High:
- ssh-manager: cancel password-watch timers on PTY exit/error
- ssh-manager: cap outputSoFar to 4096 chars to prevent unbounded growth
- connect-proxy: add 64KB header buffer cap to prevent OOM

Medium:
- startup: assign tunnelsRestoredPromise before resolve() to fix race
- https-proxy: register upstream error handler before connect callback
- connect-proxy: register upstreamSocket error handler before connect callback
- https-proxy: destroy socket on backend stream error (was sending truncated 200)
- logs: debounce broadcastLogs to prevent IPC storm on every log call

Low:
- rdp-manager: cap VNC outputBuffer entry count (not just bytes)
- https-proxy: track connections in FakeHttpServer.connections Set
  instead of private _connections API
- tab-lifecycle: clean up subscribedTabs/dashboardTabs on tab navigation
- dashboard/events: guard setupEvents() against duplicate listener registration
2026-02-28 23:28:10 -05:00
Raven Scott 15caac7032 refactor(native-host): modularize host.js and holesail-manager.js
CI / Build & Test (push) Successful in 2m46s
Split host.js (435 lines) into host/{paths,logger,startup,message-router}.js.
Split holesail-manager.js (698 lines) into holesail-manager/{state,settings,
connections,port-allocator,servers,virtual-hosts,service-tunnels,index}.js.

Top-level host.js and holesail-manager.js become thin shims so index.mjs
requires no changes. Deleted dev scratch file test-cp.mjs.

Updated CI with 12 new node --check lines for all sub-modules.
Updated docs/ARCHITECTURE.md with per-file tables for host/ and
holesail-manager/ sub-modules.

No functionality changed. No new dependencies.
2026-02-28 23:15:08 -05:00
Raven Scott 4a7399dab8 fix(persistence): save service tunnel error state; fix legacy migration; add server label
CI / Build & Test (push) Successful in 2m44s
2026-02-28 22:00:38 -05:00
Raven Scott 6c1428c6f1 updates to server tunnels
CI / Build & Test (push) Successful in 2m45s
2026-02-28 21:47:40 -05:00
Raven Scott 2cb32f9537 fix(proxy): implement JS-layer SNI for per-TLD wildcard certs and fix chunked encoding
CI / Build & Test (push) Successful in 3m27s
Replace the bare-https HTTPS proxy with a bare-tcp server that implements
SNI entirely in JavaScript. A pure-JS TLS ClientHello parser extracts the
SNI hostname from each incoming connection, derives the wildcard parent
domain by stripping the leftmost label, and selects (or generates on demand)
the correct wildcard cert via certificate-authority.getOrCreateWildcardCert().
This fixes ERR_SSL_SERVER_CERT_BAD_FORMAT for custom TLDs and supports
hostnames of any depth (e.g. i.love.hole.sail → cert *.love.hole.sail).

Also fixes ERR_INVALID_CHUNKED_ENCODING by stripping hop-by-hop headers
(Transfer-Encoding, Connection, etc.) from proxied responses — bare-http1
decodes chunked bodies internally so forwarding the header caused Chrome
to misinterpret the already-decoded body bytes.

- https-proxy.js: rewrite using bare-tcp + JS SNI peek + bare-tls per conn
- certificate-authority.js: add getOrCreateWildcardCert(parentDomain)
- host.js: remove refreshProxyCert/getActiveBaseDomains (no longer needed)
- background.js: PAC dnsDomainIs clauses already match any depth correctly
- dashboard.html: update vhost hint text to show deep hostnames are supported
- docs: update ARCHITECTURE, SECURITY, NATIVE-HOST; add VIRTUAL-HOSTS.md
2026-02-28 21:20:20 -05:00
Raven Scott 8303c72140 further tests
CI / Build & Test (push) Successful in 3m44s
2026-02-28 21:07:39 -05:00
Raven Scott 15dd9b7bd1 test
CI / Build & Test (push) Successful in 3m22s
2026-02-28 20:59:38 -05:00