GitHub - novnc/noVNC: VNC client web application
Key Points
- 1noVNC is an HTML VNC client JavaScript library and application designed for accessing VNC servers directly through modern web browsers, including mobile devices.
- 2It supports various VNC authentication methods and encodings, critically requiring WebSockets, often facilitated by a sister project like websockify.
- 3noVNC is widely integrated into platforms such as OpenStack, offers flexible deployment options including snap installation, and is licensed under MPL 2.0.
noVNC is an open-source, HTML-based VNC (Virtual Network Computing) client implemented primarily as a JavaScript library and also as a standalone web application built upon that library. Designed to run effectively in any modern web browser, including mobile platforms (iOS and Android), noVNC enables remote desktop access directly through a web interface, eliminating the need for dedicated desktop client software. It has been widely integrated into various projects and products, such as OpenStack, OpenNebula, LibVNCServer, and ThinLinc.
The core methodology of noVNC leverages standard web technologies to facilitate VNC protocol communication. Unlike traditional VNC clients that typically connect directly to a VNC server via TCP, noVNC necessitates WebSocket support for its network communication. This means that the client-side JavaScript library establishes a WebSocket connection to receive and send VNC protocol data.
Specifically, the architecture involves:
- Client-Side (noVNC): A JavaScript library running within the browser, responsible for:
- Initiating and maintaining a WebSocket connection.
- Parsing incoming VNC protocol messages (e.g., frame buffer updates, cursor changes, bell notifications) received over the WebSocket.
- Rendering the remote desktop content onto an HTML canvas element.
- Capturing local user input (mouse events, keyboard events, touch gestures) and encoding them into VNC protocol messages.
- Transmitting these input messages back to the VNC server (or proxy) via the WebSocket.
- Network Protocol (WebSockets): The VNC protocol data stream is encapsulated within WebSocket frames. This allows noVNC to bypass cross-origin restrictions and leverage the persistent, full-duplex communication capabilities of WebSockets suitable for interactive remote desktop sessions.
- Server-Side VNC Integration:
- Native WebSocket-enabled VNC Servers: Some VNC servers (e.g., x11vnc/libvncserver, QEMU, MobileVNC) natively support WebSockets, allowing noVNC to connect directly to them. In this scenario, the VNC server handles the WebSocket handshake and frames/deframes the VNC protocol data.
- WebSocket to TCP Proxy: For VNC servers that do not natively support WebSockets, an intermediary proxy is required. The
websockifyproject, a sister project to noVNC, serves this purpose. This proxy acts as a WebSocket server on one end, communicating with the noVNC client over WebSockets, and simultaneously functions as a standard VNC client on the other end, communicating with the V traditional VNC server over TCP. The proxy's role is to bridge these two network protocols, translating WebSocket frames into raw VNC TCP streams and vice-versa, effectively allowing any standard VNC server to be accessed via a web browser.
Key features of noVNC include support for a wide array of VNC authentication methods (e.g., none, classical VNC, RealVNC's RSA-AES, Tight, VeNCrypt Plain, XVP, Apple's Diffie-Hellman, UltraVNC's MSLogonII) and VNC encodings (raw, copyrect, rre, hextile, tight, tightPNG, ZRLE, JPEG, Zlib, H.264). It offers dynamic desktop scaling, clipping, and resizing, local cursor rendering, and robust clipboard copy/paste with full Unicode support. User interaction is enhanced with touch gestures for mobile devices and integrated translations.
Minimum browser requirements are specified as Chrome 89, Firefox 89, Safari 15, Opera 75, and Edge 89, reflecting its reliance on modern web technologies. Installation can be performed via novnc_proxy script for quick setup or through snap packages, which also allow running noVNC as a system service. The project is primarily licensed under the Mozilla Public License 2.0 (MPL 2.0).