VNC Basics: What is VNC
VNC is a remote desktop control system developed by AT&T LABS Europe. Up to now there have been many VNC versions, tightVnc, tigerVnc, etc. VNC includes THE VNC Server and the VNC accessed machine. Install the VNC Server and use the VNC Viewer to access the VNC Server. Use noVNC to access the VNC server instead of VNC Viewer using tightVNC to build the VNC Server.
Network agent relationship
Agency relationship:
1. TightVNC is installed on the accessed machine to become the VNC server, and port 5900 is exposed
2, the browser to access VNC server requires Tcp to Websocket conversion, so proxy port 5900 to 8080 using Websockify
3. Use Nginx to proxy noVNC web service to port 80 for external access.
4. On other hosts, run the URL :80/vnc. HTML to access the noVNC page and set the WebSocket access port to access the accessed host.
steps
Download and install TightVNC
Tight VNC download address: www.tightvnc.com/download.ph… I use the Windows version here, so installation and startup and general software installation, do not do redundant.
Download node to install NodeJS
Nodejs is downloaded to run the websocket-to-TCP service. Go to the nodejs website for the next installation.
Download enabling the Websocket-to-TCP service
Websocket-to-tcp packet address: www.npmjs.com/package/@ma… For example, if you create a folder called webSocketcp on drive C, go to this directory and install the package using NPM. To configure and enable the websocket-to-TCP service, create a config.js file in C:/webscoketcp.
var websockify = require('@maximegris/node-websockify'); //192.168.1.180 is the IP address of the VNC server websockify({source: '192.168.1.180:8080',// Websocket Server address and port 8080 target: '192.168.1.180:5900',//VNC Server address and port number :5900});Copy the code
Enable command: node config.js Enables the websocket-to-TCP service
Download enable nginx service
Download the noVNC service and enable it through nginx
Download noVNC: github.com/novnc/noVNC Deploy noVNC service to Nginx: Put noVNC project in Nginx/HTML directory to start Nginx service: In the Nginx directory, run the nginx.exe start command to start the service
Use noVNC to access the VNC server
Websocket Enter the address and port number of the WebSocket server and click Connect to access it. The access result is shown as follows: