Alex P
0e040a9b54
Merge branch 'dev' into feat/multisession-support
...
This merge integrates the latest dev branch changes while preserving all
multi-session functionality. Key changes include:
## Dev branch changes integrated:
- Network stack refactoring: migrated from internal/network to pkg/nmlite
- New NetworkManager architecture with jetdhcpc client
- Function-based config pattern to avoid shared pointer bugs
- Reboot state management via WebSocket reconnection
- Updated UI components for network settings
- GitHub workflow and PR templates
## Multi-session functionality preserved:
- Updated RPC event broadcasting from single-session to multi-session
- network.go: Changed networkStateChanged to use broadcastJSONRPCEvent
- network.go: Changed willReboot event to broadcast to all sessions
- jsonrpc.go: Updated rpcReboot to broadcast willReboot event
- config.go: Retained MultiSession and SessionSettings fields
- devices.$id.tsx: Combined video rendering logic preserving nickname/pending state
## Conflict resolutions:
1. config.go: Combined multi-session fields with dev's network refactoring
2. network.go: Adopted dev's nmlite stack and updated multi-session broadcasts
3. devices.$id.tsx: Preserved conditional video rendering for multi-session UX
4. jsonrpc.go: Fixed undefined currentSession reference
All linters pass with 0 errors and 0 warnings.
2025-10-17 00:31:44 +03: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
Alex P
cd70efb83f
feat: multi-session support with role-based permissions
...
Implements concurrent WebRTC session management with granular permission control, enabling multiple users to connect simultaneously with different access levels.
Features:
- Session modes: Primary (full control), Observer (view-only), Queued, Pending
- Role-based permissions (31 permissions across video, input, settings, system)
- Session approval workflow with configurable access control
- Primary control transfer, request, and approval mechanisms
- Grace period reconnection (prevents interruption on network issues)
- Automatic session timeout and cleanup
- Nickname system with browser-based auto-generation
- Trust-based emergency promotion (deadlock prevention)
- Session blacklisting (prevents transfer abuse)
Technical Implementation:
- Centralized permission system (internal/session package)
- Broadcast throttling (100ms global, 50ms per-session) for DoS protection
- Defense-in-depth permission validation
- Pre-allocated event maps for hot-path performance
- Lock-free session iteration with snapshot pattern
- Comprehensive session management UI with real-time updates
New Files:
- session_manager.go (1628 lines) - Core session lifecycle
- internal/session/permissions.go (306 lines) - Permission rules
- session_permissions.go (77 lines) - Package integration
- datachannel_helpers.go (11 lines) - Permission denied handler
- errors.go (10 lines) - Error definitions
- 14 new UI components (session management, approval dialogs, overlays)
50 files changed, 5836 insertions(+), 442 deletions(-)
2025-10-08 18:52:45 +03:00
Aveline
657a177462
feat: jetkvm native in cGo
2025-09-29 14:09:30 +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
Siyuan Miao
ab3dda6dee
chore(network): fix linting error errcheck
2025-07-11 11:30:02 +02:00
Marc Brooks
11a095c0f6
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-07-11 08:04:19 +02:00
Marc Brooks
ccba27cedd
chore(mDNS): ensure the mDNS mode is set every time network state changes ( #624 )
...
Eliminates (mostly) duplicate code
2025-06-19 09:29:21 +02:00
Aveline
189b84380b
network enhanecment / refactor ( #361 )
...
* chore(network): improve connectivity check
* refactor(network): rewrite network and timesync component
* feat(display): show cloud connection status
* chore: change logging verbosity
* chore(websecure): update log message
* fix(ota): validate root certificate when downloading update
* feat(ui): add network settings tab
* fix(display): cloud connecting animation
* fix: golintci issues
* feat: add network settings tab
* feat(timesync): query servers in parallel
* refactor(network): move to internal/network package
* feat(timesync): add metrics
* refactor(log): move log to internal/logging package
* refactor(mdms): move mdns to internal/mdns package
* feat(developer): add pprof endpoint
* feat(logging): add a simple logging streaming endpoint
* fix(mdns): do not start mdns until network is up
* feat(network): allow users to update network settings from ui
* fix(network): handle errors when net.IPAddr is nil
* fix(mdns): scopedLogger SIGSEGV
* fix(dhcp): watch directory instead of file to catch fsnotify.Create event
* refactor(nbd): move platform-specific code to different files
* refactor(native): move platform-specific code to different files
* chore: fix linter issues
* chore(dev_deploy): allow to override PION_LOG_TRACE
2025-04-16 01:39:23 +02:00
Siyuan Miao
0ba7902f82
chore: update logging
2025-04-11 12:55:36 +02:00
Siyuan Miao
4c37f7e079
refactor: use structured logging
2025-04-11 00:43:46 +02:00
SuperQ
75296b4b7e
Chore: Enable golangci-lint
...
Add a GitHub actions workflow to run golangci-lint.
Signed-off-by: SuperQ <superq@gmail.com>
2025-03-11 18:35:12 +01:00
SuperQ
34e33e45bf
Cleanup logging
...
Make sure all logging output is called via the main logger instead of
stdlib `"log"` or `fmt.Print(f|ln)`.
Signed-off-by: SuperQ <superq@gmail.com>
2025-03-11 16:53:54 +01:00
Aveline
554121a20b
chore: ensure config is loaded before init functions ( #226 )
2025-03-04 11:32:54 +01:00
Aveline
806792203f
feat(ntp): add delay between sync attempts and support NTP servers from DHCP ( #162 )
...
* feat(ntp): use ntp server from dhcp info
* feat(ntp): use ntp server from dhcp info
* feat(ntp): add delay between time sync attempts
* chore(ntp): more logging
2025-02-17 11:02:28 +01:00
Andrew
951173ba19
Restart mDNS every time the connection information changes ( #155 )
2025-02-13 18:10:47 +01:00
Cameron Fleming
2a99c2db9d
fix(net): stop dhcp client and release all v4 addr on linkdown ( #16 )
...
This commit fixes jetkvm/kvm#12 by disabling the udhcpc client when the
link goes down, it then removes all the active IPv4 addresses from the
deivce.
Once the link comes back up, it re-activates the udhcpc client so it can
fetch a new IPv4 address for the device.
This doesn't make any changes to the IPv6 side of things yet.
2025-02-13 15:41:10 +01:00
Adam Shiervani
20780b65db
Release 202412292127
2024-12-29 21:27:42 +01:00