node-websockify: NodeJS module version of websockify-js
Original version of websockify-js you can found here.
websockify was formerly named wsproxy and was part of the noVNC project.
At the most basic level, websockify just translates WebSockets traffic to normal socket traffic. Websockify accepts the WebSockets handshake, parses it, and then begins forwarding traffic between the client and the target in both directions.
To use node-websockify:
npm install node-websockify
const Websockify = ; async { //Create websockify instance let wsockify = source: 'localhost:5901' //WebSocket server binding address target: 'localhost:5900' //Proxying TCP port //logEnabled: false, //Disable logging ; //Start websockify instance await wsockifystart; //Some stuff... //Stops websockify instance await wsockify; };
Also supports multiple websockify by using shared webserver:
const Websockify = ; const http = ; //Shared web serverlet webServer = http;webServer; async { let wsockify1 = webServer target: 'localhost:5900' path: '/socket1' ; let wsockify2 = webServer target: 'localhost:5900' path: '/socket2' ; await wsockify1start; await wsockify2start; };
News/help/contact
Bugs and feature requests can be submitted via github issues.