Commit Graph
43 Commits
Author SHA1 Message Date
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 a07f273e05 seperate bundle for windows
CI / Build & Test (push) Successful in 3m19s
2026-03-07 02:38:03 -05:00
Raven Scott 586a32cc49 revert
CI / Build & Test (push) Successful in 3m45s
2026-03-07 02:18:35 -05:00
Raven Scott 5a5edc4b9f debug logging
CI / Build & Test (push) Failing after 3m22s
2026-03-07 02:12:04 -05:00
Raven Scott 5405e333da tests
CI / Build & Test (push) Successful in 3m38s
2026-03-07 01:49:52 -05:00
Raven Scott 0338a30b41 more testing
CI / Build & Test (push) Successful in 3m49s
2026-03-07 01:34:40 -05:00
Raven Scott 375890d34c pathing for windows
CI / Build & Test (push) Successful in 3m35s
2026-03-07 01:14:46 -05:00
Raven Scott 7c306f182b add tests
CI / Build & Test (push) Successful in 4m14s
2026-03-07 01:02:46 -05:00
Raven Scott b4a9d4d708 fix
CI / Build & Test (push) Successful in 3m47s
2026-03-06 21:59:30 -05:00
Raven Scott 6a85d27bc1 attempts to fix
CI / Build & Test (push) Successful in 4m5s
2026-03-06 21:10:13 -05: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
Raven Scott 5fc7edde0e try to fix code sign
CI / Build & Test (push) Successful in 3m44s
2026-03-06 20:50:14 -05:00
Raven Scott ea2daadac5 fix(native-host): resolve "Unexpected end of JSON input" on Windows
CI / Build & Test (push) Successful in 4m6s
Write all path variants for every .json in the bundle when building
for win32 (backslash, with/without leading slash) so bundle.read()
returns content regardless of runtime key normalization. Refill empty
or invalid JSON from alternate key or disk before writing variants.
Explicitly write tt-native package.json under Windows path variants
in Fix 1. Document in CHANGELOG.
2026-03-06 20:33:02 -05:00
Raven Scott 600a1d4f38 fix(native-host): make tt-native load on Windows (SSH PTY)
CI / Build & Test (push) Successful in 3m57s
Use forward-slash addon resolution key for all platforms in the
distributable build so the runtime finds the tt-native prebuild when
the bundle normalizes paths on Windows. Update CHANGELOG and
CONTRIBUTING to document the fix.
2026-03-06 20:22:23 -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 fe8930b1fd Write tt-native package.json under both bundle key shapes on Windows
CI / Build & Test (push) Successful in 3m49s
After unmount, the runtime may resolve #package with or without a
leading slash. Write the same content to both keys so the .json
loader never gets an empty entry and the host no longer crashes with
"Unexpected end of JSON input" on Windows.
2026-03-06 19:05:51 -05: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 4165179ae3 ix(native-host): use host-specific tt-native resolution so Linux binary loads addon
CI / Build & Test (push) Successful in 3m49s
When building with --all, the bundle used a single addon resolution (darwin-arm64),
so the Linux binary tried to load the wrong prebuild and tt-native failed. Patch
tt-native binding with a nested resolution map (addon → bare → node → platform →
arch) so the runtime selects the correct prebuild per platform; SSH PTY then works
on Linux.
2026-03-04 01:31:47 -05:00
Raven Scott f9976559bf Builder
CI / Build & Test (push) Successful in 3m54s
2026-03-04 00:37:28 -05:00
Raven Scott b03f67b126 CI
CI / Build & Test (push) Successful in 3m8s
2026-03-04 00:32:31 -05:00
Raven Scott 38459b1855 Fix CI
CI / Build & Test (push) Successful in 2m31s
2026-03-04 00:26:34 -05:00
Raven Scott 14683aa407 feat(virtual-hosts): add TLS option for HTTPS/443 backends
CI / Build & Test (push) Successful in 2m54s
- Changelog: document TLS (secure connection) option under new features
- Remove scripts/test-https-server.js and .test-https cert dir
2026-03-03 04:13:57 -05:00
Raven Scott 305bf4de97 add test server
CI / Build & Test (push) Successful in 3m5s
2026-03-03 04:04:50 -05:00
Raven Scott 39e65b2e9c Fix Firefox native messaging: separate manifests and expose disconnect reason
CI / Build & Test (push) Successful in 3m9s
- Firefox rejects native messaging manifest if allowed_origins is present.
  Install script now writes Chrome-only manifest (allowed_origins) and
  Firefox-only manifest (allowed_extensions) to their respective locations.
- Fix local Firefox manifest by removing allowed_origins.
- Log disconnect reason from port.error (Firefox) in addition to
  runtime.lastError (Chrome) so native messaging failures are visible.
- Log getState failures on disconnect for easier debugging.
2026-03-03 03:08:53 -05:00
Raven Scott 5fdafbcc33 Add Firefox-specific manifest and split packaging for Chrome zip vs XPI
CI / Build & Test (push) Successful in 3m21s
- Add extension/manifest_firefox.json (no key, moz-extension://*/* for
  web_accessible_resources) for correct Firefox MV3 behavior
- Update pack-extension.js: zip excludes manifest_firefox.json; XPI
  built separately with manifest_firefox.json as manifest.json
- Update generate-extension-id.js to set gecko.id in manifest_firefox.json
  when present (no key in Firefox manifest)
- Document dual-manifest layout and pack/generate-id behavior in CONTRIBUTING.md
2026-03-03 02:06:20 -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 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 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 f3cad8f125 fix installer
CI / Build & Test (push) Successful in 3m19s
2026-02-28 19:05:53 -05:00
Raven Scott e5a1fa71fe fix: comprehensive bug fixes, security improvements, and feature additions
CI / Build & Test (push) Successful in 3m21s
Critical fixes:
- Fix wrong registry key (com.bridgeswarm → com.holesail.browser) in
  update-native-manifest-extension-id.ps1 — script was always failing on Windows
- Create missing wrong-domain.html redirect page for .host.test URLs
- Remove options_ui pointing to non-existent options.html from manifest

High-priority bug fixes:
- ssh-manager: track and kill orphaned printf FIFO writer when key auth succeeds
- ssh-manager: fix uncancelled 2000ms fallback password timer (assign to fallbackTimer,
  clear in cancelPasswordWatch); fix null-check before removeAllListeners
- ssh-manager: add 30s Promise.race timeout to holesailInst.ready()
- backup-manager: fix macOS cp -R nesting bug by removing destination before copy;
  add tar -tzf integrity check after archive creation
- host.js: restoreBackup now stops running tunnels before restore and re-starts them
- holesail-manager: fix stale closure bug in virtual host and service tunnel
  error/close handlers (guard with v.holesail === hs check)
- dashboard.js: remove dead setText('dashTabs', ...) call referencing non-existent element

Medium improvements:
- manifest: remove unused storage and scripting permissions; restrict
  web_accessible_resources match from <all_urls> to chrome-extension://*/*
- background.js: fix self-referential browser alias (globalThis.browser ?? chrome);
  add 30s per-request timeout to send(); clean up dashboardTabs on tab close
- holesail-manager: gate saveStateSync stderr log behind DEBUG flag; updateSettings
  now returns requiresRestart:true when proxy port changes; add backupRetention field
- host.js: pass requiresRestart through in updateSettings response
- dashboard.js: remove dead loadSettings() function; add requiresRestart warning toast;
  add chrome.runtime.lastError guards in fetchState and refreshBackups;
  set dynamic version from chrome.runtime.getManifest()
- dashboard.html: remove stray </button> tag; add id="sidebarVersion" for dynamic version
- install.sh/install.ps1: fetch version from RELEASE_BASE/VERSION instead of hardcoded 1.0.0
- install.ps1: add Firefox .xpi download and Firefox registry key
- update-native-manifest-extension-id.sh: add optional Firefox manifest update
- certificate-authority.js: defer RSA key generation to setImmediate to avoid blocking
  startup; expose caReady promise
- host.js: await caReady before starting HTTPS proxy

Documentation:
- REMOTE-DESKTOP.md: correct RDP WebSocket protocol field names to match rdp-manager.js
  (destLeft/destTop/destRight/destBottom, mouseMove/mouseButton/keyEvent/keyUnicode)

Feature additions:
- dashboard.js: add Reconnect button for service tunnels in error/closed state
- https-proxy.js: add WebSocket upgrade handler to support ws:// over *.hole.sail
- connect-proxy.js: add 10s header-read timeout to protect against idle connections
- native-host: add bare-fs as explicit dependency
2026-02-28 19:00:13 -05:00
Raven Scott 49dca45d85 cleanup older downloads
CI / Build & Test (push) Successful in 3m7s
2026-02-28 18:07:35 -05:00
Raven Scott 98f75f01b3 allow upgrades, restore state on reinstall
CI / Build & Test (push) Successful in 2m53s
2026-02-28 17:43:26 -05:00
Raven Scott f8d36e16bb fix(firefox): update install instructions to use about:debugging for regular Firefox, xpi for Dev Edition/Nightly
CI / Build & Test (push) Has been cancelled
Made-with: Cursor
2026-02-27 23:59:57 -05:00
Raven Scott 64e1f3ed5e fix(installer): kill pre-extraction process directly so no orphan native host remains after install
CI / Build & Test (push) Successful in 4m45s
Made-with: Cursor
2026-02-27 21:10:34 -05:00
Raven Scott 3dd88df61f fix(install): reliably wait for addon extraction before signing on macOS
CI / Build & Test (push) Successful in 2m34s
Made-with: Cursor
2026-02-27 19:40:44 -05:00
Raven Scott affc20ef6a fix(install): sign all bare addons after extraction to prevent Gatekeeper blocking
CI / Build & Test (push) Successful in 2m35s
Made-with: Cursor
2026-02-27 19:29:19 -05:00
Raven Scott ef0a273ca5 fix(install): pre-extract and sign bare addons to prevent Gatekeeper blocking
CI / Build & Test (push) Successful in 2m40s
Made-with: Cursor
2026-02-27 19:23:00 -05:00
Raven Scott 59cdeb78f9 fix(install): ad-hoc sign darwin binary after download to satisfy Gatekeeper
CI / Build & Test (push) Successful in 2m38s
Made-with: Cursor
2026-02-27 19:19:15 -05:00
Raven Scott 93b8fc6f2f fix(build): patch bare-build codesign to allow darwin cross-compile from linux
CI / Build & Test (push) Has been cancelled
Made-with: Cursor
2026-02-27 19:17:46 -05:00
Raven Scott e43b48e38c feat: rewrite installers to download from release, remove local install
CI / Build & Test (push) Successful in 1m40s
Made-with: Cursor
2026-02-27 19:10:17 -05:00
Raven Scott d58a0b6e2d first commit
CI / Build & Test (push) Has been cancelled
2026-02-27 18:13:59 -05:00