[PR #6170] [client, management] Add embedded VNC server #29122

Open
opened 2026-08-05 08:07:29 -04:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/6170

State: open
Merged: No


Describe your changes

Adds an opt-in embedded VNC server to the client so peers can be remoted into without installing or running external VNC software. Access is gated per-peer with a "VNC enabled" toggle and per-policy ACLs, with browser-side connections going over the existing WireGuard tunnel.

Highlights:

  • Cross-platform capture and input: X11, Wayland via Xvfb session, macOS (CoreGraphics + CGEvent), Windows (DXGI desktop duplication + SendInput), FreeBSD framebuffer.
  • Per-session user agents on Windows and macOS: the daemon runs as a system service and brokers connections, but capture and input need a per-user context. Windows spawns a vnc-agent into the active WTS session via CreateProcessAsUser; macOS spawns one via launchctl asuser into the console user's launchd domain. The agents are recycled on session change (logout, fast user switch).
  • Windows secure desktop: a SAS listener brokers Ctrl+Alt+Del so login screens, UAC prompts, and the lock screen are reachable.
  • Per-peer policy: VNC access is gated by policy and a per-peer "VNC enabled" setting, surfaced through the dashboard API and the gRPC peer capability.
  • Noise_IK session auth: the dashboard generates an X25519 keypair inside the WASM client per connection and registers the public key with management as part of an ephemeral access grant. The daemon accepts the connection only after a Noise_IK handshake against that allowlisted key; the private key never leaves WASM.
  • vnc-agent subcommand powering both the Windows and macOS user-session workers.

#6135

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs will follow in a separate PR.

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

Summary by CodeRabbit

  • New Features

    • Added embedded VNC server controls, inbound approval workflows, view-only access, and session status reporting.
    • Added clipboard synchronization, text input, cursor support, optimized screen updates, and temporary-access authorization.
    • Added browser-based VNC proxy support with cross-platform screen capture and input handling.
  • Bug Fixes

    • Improved VNC authorization, configuration synchronization, session lifecycle, and status reporting.
  • Documentation

    • Added VNC management policies and localized UI text.
**Original Pull Request:** https://github.com/netbirdio/netbird/pull/6170 **State:** open **Merged:** No --- ## Describe your changes Adds an opt-in embedded VNC server to the client so peers can be remoted into without installing or running external VNC software. Access is gated per-peer with a "VNC enabled" toggle and per-policy ACLs, with browser-side connections going over the existing WireGuard tunnel. Highlights: - **Cross-platform capture and input**: X11, Wayland via Xvfb session, macOS (CoreGraphics + CGEvent), Windows (DXGI desktop duplication + SendInput), FreeBSD framebuffer. - **Per-session user agents on Windows and macOS**: the daemon runs as a system service and brokers connections, but capture and input need a per-user context. Windows spawns a `vnc-agent` into the active WTS session via `CreateProcessAsUser`; macOS spawns one via `launchctl asuser` into the console user's launchd domain. The agents are recycled on session change (logout, fast user switch). - **Windows secure desktop**: a SAS listener brokers Ctrl+Alt+Del so login screens, UAC prompts, and the lock screen are reachable. - **Per-peer policy**: VNC access is gated by policy and a per-peer "VNC enabled" setting, surfaced through the dashboard API and the gRPC peer capability. - **Noise_IK session auth**: the dashboard generates an X25519 keypair inside the WASM client per connection and registers the public key with management as part of an ephemeral access grant. The daemon accepts the connection only after a Noise_IK handshake against that allowlisted key; the private key never leaves WASM. - **`vnc-agent` subcommand** powering both the Windows and macOS user-session workers. ## Issue ticket number and link #6135 ## Stack <!-- branch-stack --> ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) Docs will follow in a separate PR. ### Docs PR URL (required if "docs added" is checked) Paste the PR link from https://github.com/netbirdio/docs here: https://github.com/netbirdio/docs/pull/__ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added embedded VNC server controls, inbound approval workflows, view-only access, and session status reporting. * Added clipboard synchronization, text input, cursor support, optimized screen updates, and temporary-access authorization. * Added browser-based VNC proxy support with cross-platform screen capture and input handling. * **Bug Fixes** * Improved VNC authorization, configuration synchronization, session lifecycle, and status reporting. * **Documentation** * Added VNC management policies and localized UI text. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
saavagebueno added the pull-request label 2026-08-05 08:07:29 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#29122