New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-websockify-js

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-websockify-js

node-websockify is NodeJS module version of websockify-js project

latest
Source
npmnpm
Version
0.8.1
Version published
Maintainers
1
Created
Source

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 = require('.');

(async () => {

    //Create websockify instance
    let wsockify = new Websockify(
        {
            source: 'localhost:5901', //WebSocket server binding address
            target: 'localhost:5900', //Proxying TCP port
            //logEnabled: false,      //Disable logging
        }
    );

    //Start websockify instance
    await wsockify.start();

    //Some stuff...

    //Stops websockify instance
    await wsockify.stop();

})();

Also supports multiple websockify by using shared webserver:

const Websockify = require('.');

const http = require('http');

//Shared web server
let webServer = http.createServer();
webServer.listen(5901);

(async () => {

    let wsockify1 = new Websockify(
        {
            webServer,
            target: 'localhost:5900',
            path: '/socket1',
        }
    );
    let wsockify2 = new Websockify(
        {
            webServer,
            target: 'localhost:5900',
            path: '/socket2',
        }
    );

    await wsockify1.start();
    await wsockify2.start();

})();

News/help/contact

Bugs and feature requests can be submitted via github issues.

FAQs

Package last updated on 26 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts