Skip to content

Version 3 - Phase 1#423

Merged
m1k1o merged 1074 commits intomasterfrom
v3
Apr 1, 2025
Merged

Version 3 - Phase 1#423
m1k1o merged 1074 commits intomasterfrom
v3

Conversation

@m1k1o
Copy link
Owner

@m1k1o m1k1o commented Sep 6, 2024

This is an implementation of Phase 1 of #371.

In the first phase only server is rewritten and legacy driver is added to ensure combatibility with the old API and config. Client will be only minimally changed to satisfy compatibility with the new workflow.

Currently not supported features

These features will be either deprecated or additional effort must be made to include them in the v3:

  • no BAN function - since v3 uses varius member providers, access control is part of them, not neko main codebase anymore - only available for users connected through legacy API.
  • no session ID for mute & unmute (shown as Somebody in GUI).
  • no session ID for locks when reloading page (shown as Somebody in GUI).
  • not sending DISCONNECT before KICK - webrtc destroy was delayed by 1sec.
  • last (admin|user) left at won't work for any provider that removed users after logout - implemented stats.
  • filetransfer enabled is sent after init and old implementation excepts it in the init - got the information directly from config..
  • 32bit ARM is not supported:
    panic: unaligned 64-bit atomic operation
    
    goroutine 169 [running]:
    runtime/internal/atomic.panicUnaligned()
    	/usr/local/go/src/runtime/internal/atomic/unaligned.go:8 +0x24
    runtime/internal/atomic.Store64(0x1f721ec, 0xfa73)
    	/usr/local/go/src/runtime/internal/atomic/atomic_arm.s:291 +0x14
    m1k1o/neko/internal/capture.(*StreamSinkManagerCtx).saveSampleBitrate(0x1f721e0, {0xc1af846f42633ee6, 0x7cccdb05f, 0x1534c68}, 0x40cc2c0000000000)
    	/src/internal/capture/streamsink.go:365 +0x19c
    m1k1o/neko/internal/capture.(*StreamSinkManagerCtx).onSample(0x1f721e0, {{0x1e64000
    2024-09-08 12:36:13,044 DEBG 'neko' stdout output:
    , 0x3858, 0x3858}, 0x3858, {0xc1af846f42633ee6, 0x7cccdb05f, 0x1534c68}, 0xa7e0b6, 0x1})
    	/src/internal/capture/streamsink.go:381 +0xb8
    m1k1o/neko/internal/capture.(*StreamSinkManagerCtx).CreatePipeline.func1()
    	/src/internal/capture/streamsink.go:343 +0xd4
    created by m1k1o/neko/internal/capture.(*StreamSinkManagerCtx).CreatePipeline in goroutine 21
    	/src/internal/capture/streamsink.go:332 +0x294
    

API changes in legacy driver

These changes need to be modified on the client side because not even the legacy driver is able to emulate them. Those are mostly some unexpeced order/timing of when the data are sent.

  • display name is updated on signal provide what is after the initial members list is sent (shown as Somebody in GUI).

TODOs:

  • Migrate demodesk/neko-client to vue3 Vue3 rewrite demodesk/neko-client#47.
  • Implement missing features from m1k1o/neko to demodesk/neko and demodesk/neko-client (vue3 branch).
  • Extend demodesk/neko to be fully backwards compatible with m1k1o/neko.
    • compatibility with legacy API:
      • ?pwd= - authentication.
        • accepts ?usr= as well, it creates new session each time. if no usr it tries with arbitrary username.
      • /ws - use original WebSocket messages?
      • /stats - use original JSON struct?
        {
            connections: 0,
            host: "",
            members: [{ session_id, displayname, admin, muted }],
            banned: { ip: session_id }
            locked: { resource: session_id },
            server_started_at: "",
            last_admin_left_at: "",
            last_user_left_at: "",
            control_protection: false,
            implicit_control: false,
        }
        
      • /screenshot.jpg - alias / redirect to /api/room/screen/shot.jpg?
      • /file - alias to /api/filetransfer?
      • /health - alias to /api/health?
      • ability to turn off/on legacy API using config.
    • compatibility with legacy configuration:
      • all legacy configuration options should be available
      • legacy pipeline builder video_bitrate, max_fps, audio_bitrate.
    • libclipboard is handled differently; should be an option to switch at build time. there is no UX impact.
    • client heartbeat feat(general): add heartbeat to websocket control #460
    • upgrade docs
      • explain limitations of the legacy driver if its being used 11797b1
      • list new config options
      • provide migration guide from old to new config options 33580fe
      • list the new REST API 5886d94
      • provide migration guide from old to new api 3ac462e
    • upgrade deployment scripts
    • refactor github workflows
    • write (probably kilometer long) release notes

m1k1o added 30 commits April 18, 2023 12:07
* refactor websocket peer and comment functions.

* update comments.

* add DestroyWebSocketPeer.
* rewrite to use stream selector.

* WIP.

* add nacks to metrics.

* add estimate trend.

* estimator based on trend detector.

* add estimator unstable duration.

* add estimator debug.

* add stalled duration.

* estimator move values to config.

* change default estimator values.

* minor style changes.

* fix websocket video messages.

* replace video track with ivdeo id.
* send message error.

* read message error.

* close webrtc conn only if not closed yet.

* file upload no files received.
* upgrade go dependencies.

* remove testify deep equal.
* add audio and signal request.

* disable audio by default.

* fix SignalProvide.

* disable estimator when track disabled.
* add xf86 input driver.

* cleanup.

* rewrite to unix socket PoC.

* add input rebuild.

* lint & docs.

* add input driver struct.

* comments, lint, socket name from config.

* add touch events to webrtc.

* switch to uint32.

* misc update logging & linting,

* fix screen size

* set touchscreen as core pointer.

* add touch to ws control.

* SendCoreEvents.

* extract to own xinput folder.

* add debounce.

* switch pressure to uint8.

* check buffer size.

* send touch events with system init.
* upgrade to bookworm.

* g_memdup is deprecated: Use g_memdup2 instead.

* upgrade nvidia dockerfile.

* revert devcontainer.
@m1k1o m1k1o merged commit 295bbfd into master Apr 1, 2025
4 checks passed
@m1k1o m1k1o deleted the v3 branch September 11, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments