Received: from eggs.gnu.org ([208.118.235.92]:33868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZNcL-0007PS-Q8 for qemu-devel@nongnu.org; Fri, 16 Nov 2012 10:14:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TZNcI-0003VV-Ng for qemu-devel@nongnu.org; Fri, 16 Nov 2012 10:14:05 -0500 Received: from cantor2.suse.de ([195.135.220.15]:46306 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZNcI-0003V8-HY for qemu-devel@nongnu.org; Fri, 16 Nov 2012 10:14:02 -0500 From: Tim Hardeck Date: Fri, 16 Nov 2012 16:13:17 +0100 Message-Id: <1353078798-6472-1-git-send-email-thardeck@suse.de> Subject: [Qemu-devel] [PATCH] vnc: added initial websockets support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Tim Hardeck , github@martintribe.org This patch adds basic Websockets support to the QEMU VNC component. Websockets allow every modern web browser to connect to QEMU VNC without any additional plugins. Because of the GnuTLS requirement the Websockets implementation is optional (--enable-vnc-ws). Websockets connections are recognized by waiting 500ms for a Websocket handshake. If no data is received a regular vnc connection is assumed. If this is not acceptable please suggest if Websockets should be activated by a new VNC option or by an additional console parameter on a different port. SHA1 is required for the handshake which is generated with GnuTLS. Since using GnuTLS does automatically activate VNC-TLS, which has warnings about deprecated parts, I have changed the configure script to disable VNC-TLS if not explicitly enabled. The Websockets support was tested with noVNC http://kanaka.github.com/noVNC/ . I have used parts of the LibVNC websockets implementation that's why I have added the GPL header to the new files. I hope that it is fine that way. Tim Hardeck (1): vnc: added initial websockets support configure | 34 +++++++- ui/Makefile.objs | 1 + ui/vnc-ws.c | 236 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ ui/vnc-ws.h | 104 ++++++++++++++++++++++++ ui/vnc.c | 93 ++++++++++++++++++--- ui/vnc.h | 15 ++++ 6 files changed, 471 insertions(+), 12 deletions(-) create mode 100644 ui/vnc-ws.c create mode 100644 ui/vnc-ws.h -- 1.7.10.4