First few explanations :
noVNC and websockify are actually separate projects:
- websockify is a common proxy bridge that allows WebSocket connections (for example, from a browser) to connect to non-core TCP socket services (for example, to a VNC server).
- noVNC - VNC HTML5 client.
If the VNC server supports WebSocket connections, then websockify is not needed. The only VNC server that currently supports direct connections to WebSocket is this version of libvncserver . websockify is included in noVNC since most VNC servers do not yet support WebSocket clients, but websockify is a separate project .
You are dealing with two different network connections, each of which has its own encryption settings:
- noVNC (browser) for websockify - using the WebSocket protocol
- websockify on x11vnc (VNC server) - direct connection to a TCP socket
The WebSocket protocol supports unencrypted connections (ws: //) and encrypted SSL / TLS connections (wss: //).
In the RFB protocol (Remote Frame Buffer) used in VNC, it is possible to update during initialization to use an encrypted connection. There are several encryption methods, such as TLS (security type 18), VeNCrypt (security type 19).
Now to your question :
When you pass -ssl PEM to x11vnc this is RFB / VNC encryption enabled. noVNC does not support RFB / VNC encryption. Javascript is not fast enough to make encryption / decryption fast enough for noVNC to be used. There is a discussion about adding a cryptographic API to Javascript that will allow noVNC to support this type of encryption.
When you enable encryption in noVNC, you enable WebSocket encryption (wss: //). This encrypts the connection between the browser and websockify. As long as the connection between websockify and the VNC server is over a trusted network (for example, it runs on the same server) and uses WebSocket encryption in noVNC, then no unencrypted data will be disclosed. However, if you run websockify on the same system as your browser, and the VNC server is deleted, then the VNC traffic from your client to the server system will not be encrypted (if noVNC does not receive support for RFB / VNC VeNCrypt encryption in the future).
Exiting websockify will indicate if the WebSocket connection is encrypted or unencrypted.
source share