Commit Graph

344 Commits

Author SHA1 Message Date
Adam Shiervani 44b25eb33f refactor: close and reset keysDownStateQueue in newSession function 2025-09-18 13:12:11 +02:00
Adam Shiervani e7ccb71aea refactor: reduce keysDownStateQueueSize 2025-09-18 13:12:11 +02:00
Adam Shiervani 7a96aa3044 refactor: clarify comments in useKeyboard hook for resetKeyboardState function 2025-09-18 13:12:11 +02:00
Adam Shiervani a2b060b42e refactor: streamline keep-alive timer management in useKeyboard hook 2025-09-18 13:12:11 +02:00
Adam Shiervani 820e462dda refactor: optimize dependencies in useHidRpc hooks 2025-09-18 13:12:11 +02:00
Adam Shiervani 9da2676a2a refactor: remove nil check for kbdAutoReleaseTimers in DelayAutoReleaseWithDuration 2025-09-18 13:12:00 +02:00
Adam Shiervani 8681d1ffa0 fix: prevent nil pointer dereference when stopping timers in Close method 2025-09-18 13:12:00 +02:00
Adam Shiervani b1f345db70 Use harcoded timer reset value for now 2025-09-18 13:12:00 +02:00
Siyuan Miao 6892eeba42 chore: use dynamic duration for scheduleAutoRelease 2025-09-18 13:12:00 +02:00
Siyuan Miao 53789ebd75 clean up code 2025-09-18 13:12:00 +02:00
Siyuan Miao a95789f417 gofmt 2025-09-18 13:12:00 +02:00
Adam Shiervani 23c79941d2 refactor: enhance keep-alive handling and jitter compensation in HID RPC
- Implemented staleness guard to ignore outdated keep-alive packets.
- Added jitter compensation logic to adjust timer extensions based on packet arrival times.
- Introduced new methods for managing keep-alive state and reset functionality in the Session struct.
- Updated auto-release delay mechanism to use dynamic durations based on keep-alive timing.
- Adjusted keep-alive interval in the UI to improve responsiveness.
2025-09-18 13:12:00 +02:00
Adam Shiervani c394fc559d fix: update auto-release keyboard interval to 225 2025-09-18 13:12:00 +02:00
Adam Shiervani cc93748d8d fix: log warning on keypress report failure 2025-09-18 13:12:00 +02:00
Adam Shiervani 4ad13a5798 fix: handle error in key release process and log warnings 2025-09-18 13:12:00 +02:00
Adam Shiervani 2eae80ef1d refactor: remove unused NewKeypressKeepAliveMessage function from HID RPC 2025-09-18 13:12:00 +02:00
Adam Shiervani 6b03af6583 refactor: replace console.warn with console.info for HID RPC channel events 2025-09-18 13:11:47 +02:00
Adam Shiervani 5e18e08907 refactor: send keypress as early as possible 2025-09-18 13:11:46 +02:00
Adam Shiervani 5a3729befb fix: correct Windows default auto-repeat delay comment from 1ms to 1s 2025-09-18 13:09:53 +02:00
Adam Shiervani 60263359b9 refactor: enhance keyboard auto-release functionality and key state management 2025-09-18 13:09:53 +02:00
Adam Shiervani e3eb8330fe refactor: simplify HID RPC keyboard input handling and improve key state management
- Updated `handleHidRPCKeyboardInput` to return errors directly instead of keys down state.
- Refactored `rpcKeyboardReport` and `rpcKeypressReport` to return errors instead of states.
- Introduced a queue for managing key down state updates in the `Session` struct to prevent input handling stalls.
- Adjusted the `UpdateKeysDown` method to handle state changes more efficiently.
- Removed unnecessary logging and commented-out code for clarity.
2025-09-18 13:09:43 +02:00
Siyuan Miao e9b252430f chore: use the proper key to send release command 2025-09-18 13:09:03 +02:00
Siyuan Miao 720cd40157 chore: add timeout for KeypressReport 2025-09-18 13:09:03 +02:00
Siyuan Miao d05ed45871 chore: add trace log for writeWithTimeout 2025-09-18 13:09:03 +02:00
Siyuan Miao e32a265836 fix: handshake won't happen if webrtc reconnects 2025-09-18 13:09:03 +02:00
Siyuan Miao edd8137ed0 fix: should cancelAutorelease when pressed is true 2025-09-18 13:09:03 +02:00
Siyuan Miao 4501b96237 chore: update comment for KEEPALIVE_INTERVAL 2025-09-18 13:09:03 +02:00
Siyuan Miao 8d03792479 chore: update logging for kbdAutoReleaseLock 2025-09-18 13:09:03 +02:00
Siyuan Miao bc94ae5856 chore: adjust auto release key interval 2025-09-18 13:09:03 +02:00
Siyuan Miao f10a2283d4 chore: use ordered unreliable channel for pointer events 2025-09-18 13:08:23 +02:00
Siyuan Miao 3f83efa830 chore: use unreliable channel to send keepalive events 2025-09-18 13:08:08 +02:00
Siyuan Miao 19be5ea885 clean up logging 2025-09-18 13:07:35 +02:00
Siyuan Miao 9b6bf6217a remove logging 2025-09-18 13:07:25 +02:00
Siyuan Miao 56dfb4febd send keepalive when pressing the key 2025-09-18 13:07:25 +02:00
Siyuan Miao 6ed633e380 feat: release keyPress automatically 2025-09-18 13:03:41 +02:00
Aveline 72e3013337
feat: send all paste keystrokes to backend (#789)
* feat: send all paste keystrokes to backend

* feat: cancel paste mode

* wip: send macro using hidRPC channel

* add delay

* feat: allow paste progress to be cancelled

* allow user to override delay

* chore: clear keysDownState

* fix: use currentSession.reportHidRPCKeyboardMacroState

* fix: jsonrpc.go:1142:21: Error return value is not checked (errcheck)

* fix: performance issue of Uint8Array concat

* chore: hide delay option when debugMode isn't enabled

* feat: use clientSide macro if backend doesn't support macros

* fix: update keysDownState handling

* minor issues

* refactor

* fix: send duplicated keyDownState

* chore: add max length for paste text

---------

Co-authored-by: Adam Shiervani <adam.shiervani@gmail.com>
2025-09-18 13:00:57 +02:00
Marc 25b102ac34
fix: ensure that security-key backed SSH keys are supported (#807) 2025-09-17 12:14:45 +02:00
Aveline 5c94c6c87f
chore: upgrade jetkvm native and fix the params of fadeIn / fadeOut (#808) 2025-09-17 01:38:23 +02:00
Marc Brooks cf679978be
fix(timesync): ensure that auto-update waits for time sync (#609)
- Added check to not attempt auto update if time sync is needed and not yet successful (delays 30 second to recheck).
- Added resync of time when DHCP or link state changes if online
- Added conditional* fallback from configured* NTP servers to the IP-named NTP servers, and then to the DNS named ones if that fails
- Added conditional* fallback from the configured* HTTP servers to the default DNS named ones.
- Uses the configuration* option for how many queries to run in parallel
- Added known static IPs for time servers (in case DNS resolution isn't up yet)
- Added time.cloudflare.com to fall-back NTP servers
- Added fallback to NTP via hostnames
- Logs the resultant time (and mode)
2025-09-16 15:37:02 +02:00
Marc Brooks 80a8b9e9e3
feat: Adds IPv6 disabling feature (#803)
* Allow disabling IPv6

Simply ignores any IPv6 addresses in the lease and doesn't offer them to the RPC
Also fixed display issue for IPv6 link local address.
Fixes https://github.com/orgs/jetkvm/projects/7/views/1?pane=issue&itemId=122761546&issue=jetkvm%7Ckvm%7C685

* Don't listen on disabled addresses in mDNS or web server.

* We have to set the IPv4 and IPv6 modes on the server.
2025-09-16 12:44:56 +02:00
Aveline 1717549578
fix: goroutine leak issue of cloudBlink (#801)
* fix: goroutine leak issue of cloudBlink

* chore: add lock and allow context to be cancelled earlier
2025-09-12 18:30:35 +02:00
Aveline 37b1a8bf34
docs: update pprof section of DEVELOPMENT.md (#802) 2025-09-12 11:11:28 +02:00
Marc Brooks ca8b06f4cf
chore: enhance the gzip and cacheable handling of static files
Add SVG and ICO to cacheable files.
Emit robots.txt directly.
Recognize WOFF2 (font) files as assets (so the get the immutable treatment)
Pre-gzip the entire /static/ directory (not just /static/assets/) and include SVG, ICO, and HTML files
Ensure fonts.css is processed by vite/rollup so that the preload and css reference the same immutable files (which get long-cached with hashes)
Add CircularXXWeb-Black to the preload list as it is used in the hot-path.
Handle system-driven color-scheme changes from dark to light correctly.
2025-09-12 08:41:41 +02:00
Aveline 33e099f258
update netboot.xyz-multiarch.iso to 2.0.88 (#799)
* chore: update netboot.xyz-multiarch.iso to 2.0.88

* feat: add script to update netboot.xyz iso
2025-09-12 08:41:17 +02:00
Aveline ea068414dc
feat: validate ssh public key before saving (#794)
* feat: validate ssh public key before saving

* fix: TestValidSSHKeyTypes
2025-09-11 23:32:40 +02:00
Adam Shiervani 8d1a66806c
refactor(ui): Don't fetch KeybardAndMouse Icon on every re-render (#795) 2025-09-11 19:57:35 +02:00
Aveline 6202e3cafa
chore: serve pre-compressed static files (#793) 2025-09-11 19:17:15 +02:00
dependabot[bot] c866230711
build(deps-dev): bump vite (#788)
Bumps the npm_and_yarn group with 1 update in the /ui directory: [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `vite` from 7.1.4 to 7.1.5
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v7.1.5/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-version: 7.1.5
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-11 12:07:52 +02:00
Marc Brooks c8dd84c6b7
fix/Jiggler settings not saving (#786)
Ensure the jiggler config loads the defaults so they can be saved.
Ensure the file.Sync occurs before acknowledging save.
Also fixup the old KeyboardLayout to use en-US not en_US
2025-09-09 14:48:49 +02:00
Adam Shiervani c98592a412
feat(ui): Enhance EDID settings with loading state (#691)
* feat(ui): Enhance EDID settings with loading state and Fieldset component

* fix(ui): Improve notifications and adjust styling in custom EDID component

* fix(ui): specify JsonRpcResponse type
2025-09-08 11:38:49 +02:00