Commit Graph

82 Commits

Author SHA1 Message Date
Siyuan 892e5f4195 chore: reduce reboot delay to 3 seconds 2025-11-18 16:17:45 +00:00
Siyuan b8af39cae9 fix: set updating flag to false when update is complete 2025-11-18 15:59:30 +00:00
Adam Shiervani 999c8c79b0 fix(ota): update redirect URL from /device/setup to /welcome in doUpdate function 2025-11-18 16:57:18 +01:00
Adam Shiervani 8113cd40ad feat(ota): set updating immediately 2025-11-18 16:28:58 +01:00
Siyuan ad8acd0902 chore(ota): only show selected TLS connection state fields in trace logging 2025-11-18 14:33:12 +00:00
Siyuan fc8cfadb9f chore(ota): add trace logging to HTTP requests 2025-11-18 14:26:45 +00:00
Siyuan 88becfeed1 chore(ota): rename component->downloadComponent in trace logging 2025-11-18 14:13:57 +00:00
Siyuan e79f03d0db feat: add trace logging to OTA download 2025-11-18 14:07:59 +00:00
Adam Shiervani 6aa740d3b2 chore: remove early return in doUpdate when custom update is set 2025-11-18 15:04:05 +01:00
Siyuan 7c79b3e514 chore: remove redundant s.updating = false assignment, as it's already set in the componentUpdateError function 2025-11-18 13:37:04 +00:00
Adam Shiervani aee9940476 feat: mark updating state during app and system updates 2025-11-18 11:28:31 +01:00
Adam Shiervani d8ee8b4d94 Send error the frontend and reset updating state 2025-11-18 11:27:00 +01:00
Siyuan d205df50e9 chore: add requestID to update status API calls and increase timeout to 10s 2025-11-18 03:38:42 +00:00
Siyuan d9f8054906 feat: disable auto-update when custom version update is detected 2025-11-17 14:53:47 +00:00
Siyuan 176b7d2f06 cleanup: remove CheckOnly from UpdateParams 2025-11-17 13:34:21 +00:00
Siyuan eff4920a06 fix: remove mutex from updateApp & updateSystem 2025-11-17 13:33:18 +00:00
Siyuan e1943c89e8 fix: do not set zero values in RPCState 2025-11-17 13:16:54 +00:00
Siyuan c19bd0d46b fix: set updating to false when checking for updates failed 2025-11-17 12:27:07 +00:00
Siyuan 3b0efa7d20 chore: use json schema for ota test data 2025-11-17 12:22:57 +00:00
Siyuan 1880d5bfbc fix: set components to default components if not set 2025-11-17 10:42:18 +00:00
Siyuan 1d7f8ddc29 clean up comments 2025-11-14 12:08:31 +00:00
Siyuan 0eff994878 fix: update custom version update logic 2025-11-14 12:07:01 +00:00
Siyuan 4411c45cd5 fix: defer updating state update to after update is complete 2025-11-14 12:04:22 +00:00
Aveline fe9523b1a7
Merge branch 'dev' into r/ota 2025-11-14 12:57:05 +01:00
Siyuan 8d085a6071 refactor(ota): improve OTA state management 2025-11-14 11:55:22 +00:00
Aveline 5fb4c629dd
feat: failsafe mode (#952)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Adam Shiervani <adam.shiervani@gmail.com>
Co-authored-by: Marc Brooks <IDisposable@gmail.com>
2025-11-11 13:13:42 +01:00
Siyuan 3fab951d43 fix(ota): should only check update if target version is specified 2025-11-10 13:19:21 +00:00
Siyuan 9832be29ef refactor: remove downgrade attributes from ota state and jsonrpc 2025-11-07 17:13:04 +00:00
Siyuan ba76d5bbc9 refactor(ui): simplify update dialog 2025-11-07 16:01:09 +00:00
Siyuan 1bca0c5e26 refactor: simplify version check and downgrade 2025-11-07 12:20:57 +00:00
Siyuan 329ad025bf fix: should return error if version is not available 2025-11-07 09:01:55 +00:00
Siyuan 252dcba7a1 fix: rename redirectUrl to redirectTo 2025-11-07 08:06:42 +00:00
Siyuan 95e5e15226 feat: redirect to setup page after config reset 2025-11-07 08:04:23 +00:00
Siyuan 1e9dcc1986 feat: allow configuration to be reset during update 2025-11-07 08:04:23 +00:00
Siyuan f6b0b7297d fix: update components 2025-11-07 08:04:23 +00:00
Siyuan 2b3f392f0f cleanup: ota state 2025-11-07 08:03:43 +00:00
Siyuan 0a98a73275 feat: downgrade 2025-11-07 08:03:43 +00:00
Siyuan 85f7f60618 WIP: OTA refactor 2025-11-07 08:03:18 +00:00
Adam Shiervani 1ce63664c0
fix: video quality (#913) 2025-10-29 16:11:07 +01:00
Aveline 2444817455
chore: disable sleep mode when detecting video format (#887)
Co-authored-by: Adam Shiervani <adam.shiervani@gmail.com>
Co-authored-by: Adam Shiervani <adamshiervani@fastmail.com>
2025-10-17 17:51:02 +02:00
Aveline c775979ccb
feat: refactoring network stack (#878)
Co-authored-by: Adam Shiervani <adam.shiervani@gmail.com>
2025-10-15 18:32:58 +02:00
Aveline cc9ff74276
feat: add HDMI sleep mode (#881) 2025-10-09 14:52:51 +02:00
Alex bdd6f4247b
fix: segfault in cGo 2025-10-02 19:15:03 +02:00
Aveline 657a177462
feat: jetkvm native in cGo 2025-09-29 14:09:30 +02:00
Aveline afb146d78c
feat: release keyPress automatically (#796)
* feat: release keyPress automatically

* send keepalive when pressing the key

* remove logging

* clean up logging

* chore: use unreliable channel to send keepalive events

* chore: use ordered unreliable channel for pointer events

* chore: adjust auto release key interval

* chore: update logging for kbdAutoReleaseLock

* chore: update comment for KEEPALIVE_INTERVAL

* fix: should cancelAutorelease when pressed is true

* fix: handshake won't happen if webrtc reconnects

* chore: add trace log for writeWithTimeout

* chore: add timeout for KeypressReport

* chore: use the proper key to send release command

* 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.

* refactor: enhance keyboard auto-release functionality and key state management

* fix: correct Windows default auto-repeat delay comment from 1ms to 1s

* refactor: send keypress as early as possible

* refactor: replace console.warn with console.info for HID RPC channel events

* refactor: remove unused NewKeypressKeepAliveMessage function from HID RPC

* fix: handle error in key release process and log warnings

* fix: log warning on keypress report failure

* fix: update auto-release keyboard interval to 225

* 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.

* gofmt

* clean up code

* chore: use dynamic duration for scheduleAutoRelease

* Use harcoded timer reset value for now

* fix: prevent nil pointer dereference when stopping timers in Close method

* refactor: remove nil check for kbdAutoReleaseTimers in DelayAutoReleaseWithDuration

* refactor: optimize dependencies in useHidRpc hooks

* refactor: streamline keep-alive timer management in useKeyboard hook

* refactor: clarify comments in useKeyboard hook for resetKeyboardState function

* refactor: reduce keysDownStateQueueSize

* refactor: close and reset keysDownStateQueue in newSession function

* chore: resolve conflicts

* resolve conflicts

---------

Co-authored-by: Adam Shiervani <adam.shiervani@gmail.com>
2025-09-18 13:35:47 +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
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 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