Commit Graph

69 Commits

Author SHA1 Message Date
Siyuan Miao b46139e18d feat: add ci helper scripts 2025-09-26 08:22:02 +00:00
Siyuan Miao fb5ed4d62e reduce initial build time 2025-09-26 08:22:01 +00:00
Siyuan Miao e53f7bdb70 add build cache to dev_deploy.sh 2025-09-26 08:22:01 +00:00
Siyuan Miao f20a7d7022 show video debugging info 2025-09-26 08:21:21 +00:00
Siyuan Miao 6c677f2f95 cleanup 2025-09-26 08:21:20 +00:00
Siyuan Miao a3ddb071e8 update state 2025-09-26 08:21:20 +00:00
Siyuan Miao 9bd3436536 fix ipv6 address truncation 2025-09-26 08:21:20 +00:00
Siyuan Miao 84a28454f4 minor ui fixes 2025-09-26 08:21:20 +00:00
Siyuan Miao 837b75f83c feat: add reset config and reboot buttons to UI 2025-09-26 08:21:20 +00:00
Siyuan Miao 8123900f26 add locks and missing comments 2025-09-26 08:21:20 +00:00
Siyuan Miao 2e939c918f chore: use log_error in native library 2025-09-26 08:21:20 +00:00
Siyuan Miao efaab7369b fix: race condition in native library 2025-09-26 08:21:20 +00:00
Siyuan Miao d0df8eaa44 remove lldp 2025-09-26 08:21:20 +00:00
Siyuan Miao 9db23f28db fix(native): add video init to native start 2025-09-26 08:21:20 +00:00
Siyuan Miao 8d368a8a7c hide unfinished features 2025-09-26 08:21:20 +00:00
Siyuan Miao ace2934111 add native library to make build process faster 2025-09-26 08:21:20 +00:00
Siyuan Miao 35c9401cdb chore: add built ui files 2025-09-26 08:21:20 +00:00
Siyuan Miao e99fd0d639 add no network screen 2025-09-26 08:21:20 +00:00
Siyuan Miao 9b755e7255 fix deps 2025-09-26 08:21:20 +00:00
Siyuan Miao d0346c0890 remove useless lvgl config 2025-09-26 08:21:19 +00:00
Siyuan Miao 610f111a29 move event handling to native 2025-09-26 08:21:19 +00:00
Siyuan Miao 9df20e0d6e refactor functions 2025-09-26 08:21:19 +00:00
Siyuan Miao 156903c59b feat: update github actions 2025-09-26 08:21:19 +00:00
Siyuan Miao 73a1ed3976 feat: remove lvgl examples and demos 2025-09-26 08:21:19 +00:00
Siyuan Miao 84bdbe0ebf chore: add LV_STATE_DISABLED to obj set state 2025-09-26 08:21:19 +00:00
Siyuan Miao be84ed101e feat: implement about screen 2025-09-26 08:21:19 +00:00
Siyuan Miao 74d177b365 feat: add video frame handling 2025-09-26 08:21:19 +00:00
Siyuan Miao 9468bf057b feat: native as lib 2025-09-26 08:21:19 +00:00
Siyuan Miao 52b773e97e fix lint issues 2025-09-26 08:21:19 +00:00
Siyuan Miao 5349553a8a feat(lldp): show neighbors in UI 2025-09-26 08:21:19 +00:00
Siyuan Miao 4bb790922f feat(lldp): implement rx 2025-09-26 08:21:19 +00:00
Aveline f64d8aaadd 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-26 08:21:19 +00:00
Aveline dbeb08e0bc 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-26 08:21:18 +00:00
Marc c269361adf fix: ensure that security-key backed SSH keys are supported (#807) 2025-09-26 08:21:18 +00:00
Marc Brooks e9b0a60028 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-26 08:21:18 +00:00
Marc Brooks 99eb662299 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-26 08:21:18 +00:00
Aveline 06ff70691b feat: validate ssh public key before saving (#794)
* feat: validate ssh public key before saving

* fix: TestValidSSHKeyTypes
2025-09-26 08:21:18 +00:00
Aveline 863053c2da feat: hid rpc channel (#755)
* feat: use hidRpcChannel to save bandwidth

* chore: simplify handshake of hid rpc

* add logs

* chore: add timeout when writing to hid endpoints

* fix issues

* chore: show hid rpc version

* refactor hidrpc marshal / unmarshal

* add queues for keyboard / mouse event

* chore: change logging level of JSONRPC send event to trace

* minor changes related to logging

* fix: nil check

* chore: add comments and remove unused code

* add useMouse

* chore: log msg data only when debug or trace mode

* chore: make tslint happy

* chore: unlock keyboardStateLock before calling onKeysDownChange

* chore: remove keyPressReportApiAvailable

* chore: change version handle

* chore: clean up unused functions

* remove comments
2025-09-26 08:21:18 +00:00
Marc Brooks 0884d8138c Add ability to track modifier state on the device (#725)
Remove LED sync source option and add keypress reporting while still working with devices that haven't been upgraded
We return the modifiers as the valid bitmask so that the VirtualKeyboard and InfoBar can represent the correct keys as down. This is important when we have strokes like Left-Control + Right-Control + Keypad-1 (used in switching KVMs and such).
Fix handling of modifier keys in client and also removed the extraneous resetKeyboardState.
Manage state to eliminate rerenders by judicious use of useMemo.
Centralized keyboard layout and localized display maps
Move keyboardOptions to useKeyboardLayouts
Added translations for display maps.
Add documentation on the legacy support.

Return the KeysDownState from keyboardReport
Clear out the hidErrorRollOver once sent to reset the keyboard to nothing down.
Handles the returned KeysDownState from keyboardReport
Now passes all logic through handleKeyPress.
If we get a state back from a keyboardReport, use it and also enable keypressReport because we now know it's an upgraded device.
Added exposition on isoCode management

Fix de-DE chars to reflect German E2 keyboard.
https://kbdlayout.info/kbdgre2/overview+virtualkeys

Ran go modernize
Morphs Interface{} to any
Ranges over SplitSeq and FieldSeq for iterating splits
Used min for end calculation remote_mount.Read
Used range 16 in wol.createMagicPacket
DID NOT apply the Omitempty cleanup.

Strong typed in the typescript realm.
Cleanup react state management to enable upgrading Zustand
2025-09-26 08:21:18 +00:00
Adam Shiervani 35b0f70a19 feat: improve custom jiggler settings and add timezone support (#742)
* feat: add timezone support to jiggler and fix custom settings persistence

- Add timezone field to JigglerConfig with comprehensive IANA timezone list
- Fix custom settings not loading current values
- Remove business hours preset, add as examples in custom settings
- Improve error handling for invalid cron expressions

* fix: format jiggler.go with gofmt

* fix: add embedded timezone data and validation

- Import time/tzdata to embed timezone database in binary
- Add timezone validation in runJigglerCronTab() to gracefully fallback to UTC
- Add timezone to debug logging in rpcSetJigglerConfig
- Fixes 'unknown time zone' errors when system lacks timezone data

* refactor: add timezone field comments from jiggler options

* chore: move tzdata to backend

* refactor: fix JigglerSetting linting

- Adjusted useEffect dependency to include send function for better data fetching
- Modified layout classes for improved responsiveness and consistency
- Cleaned up code formatting for better readability

---------

Co-authored-by: Siyuan Miao <i@xswan.net>
2025-09-26 08:21:18 +00:00
Marc Brooks af4d1915b1 chore/ Fix go lint error (#683) 2025-09-26 08:21:18 +00:00
rmschooley d4cbf0cbad Remove Out Endpoint Descriptors from Absolute Mouse and Relative Mouse (#542)
* Update hid_mouse_absolute.go

Added attribute to remove unnecessary out endpoint.

* Update hid_mouse_relative.go

Added attribute to remove unnecessary out endpoint.

* Update hid_keyboard.go

Added attribute to explicitly keep currently needed out endpoint and to make listed attributes consistent across the keyboard and mouse devices.

---------

Co-authored-by: Aveline <352441+ym@users.noreply.github.com>
2025-09-26 08:21:18 +00:00
Daniel Collins 99c2248325 Implement HTTP proxy option (#515). (#521)
This commit adds a "Proxy" field to the network settings screen, which
can be used to specify a HTTP proxy for any outgoing requests from the
device.
2025-09-26 08:21:18 +00:00
Marc Brooks 4fe3ad4160 feat(ntp): enhances time sync with DHCP NTP and custom servers (#625)
* Ensure the mDNS mode is set every time network state changes

Eliminates (mostly) duplicate code

* Add custom NTP and HTTP time sync servers

Since the ordering may have been previously defaulted and saved as "ntp,http", but that was being ignored and fallback-defaults were being used, in Ordering, `ntp` means use the fallback NTP servers, and `http` means use the fallback HTTP URLs. Thus `ntp_user_provided` and `http_user_provided` are the user specified static lists.

* Add support for using DHCP-provided NTP server
2025-09-26 08:21:18 +00:00
Marc Brooks be2c2bbed3 chore: fix the base usb configuration (#610)
In reviewing the config.go settings for idProduct and bcdDevice are not formatted correctly. All examples on GitHub have 0x0104 and 0x0100 respectively. The idProduct value gets overwritten with valid values when you change the configuration (because they are correct in the options), but until you do the USB initialization will not be correct.
2025-09-26 08:21:18 +00:00
Aveline d0e66021c3 chore: typo 'supression' should be 'suppression' (#671) 2025-09-26 08:21:18 +00:00
Aveline 660473aea2 fix(usbgadget): add lock for logWithSupression (#653) 2025-09-26 08:21:18 +00:00
Aveline 409d66f681 feat(usbgadget): suppress duplicate error logs (#630). 2025-09-26 08:21:18 +00:00
ronskvm f87a74e23a chore(hid): change absolute mouse usb interface descriptor's subclass field to zero
Changed absolute mouse usb interface descriptor's subclass field to zero.
2025-09-26 08:21:18 +00:00
Aveline 7e0c865941 fix(timesync): queryMultipleHttp hanging if all servers are unreachable (#605) 2025-09-26 08:21:18 +00:00