Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

multiwebsock2tcp

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multiwebsock2tcp

Sort of restfull client to create multiple WebSocket-to-TCP proxy/bridges

  • 0.3.6
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

#multiWebsock2Tcp

MultiWebsock2Tcp is a sort of multi webscocket to tcp bridge server.

Its intended to use in conjunction with noVNC.

It can also use certs to create a cecure connection to to noVNC.

Installing

git clone https://github.com/timhaak/multiWebsock2Tcp
cd multiWebsock2Tcp
npm install

##Running To start the server just run

node index.js

By defaul the server will be listening on port 3000

##Options You can pass a couple options to the server Use To set web server port --port

To preserver websocket connection setup between restarts --preserve

To enable wss:// --key key.pem --cert cert.pem

You can genreate test cert and key by running

openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout key.pem

If you would like to load a diffrent initial websocket config file. --preserveFile file or have a file called ./CurrentConnections.js

By default you can only connect from 127.0.01

To set the ip that you are allowed to connect to the server on use --ips ip1,ip2

##Examples

###Add a connection Do a post request to http://127.0.0.1:3000/ws?src_ip=192.168.100.5&local_port=2333&remote_ip=10.10.10.10&remote_port=5900

This will create a tunnel listening on port 2333 connected to 10.10.10.10 and port 5900. It will also only accept connections from 192.168.100.5. It will also return a list of the current connections.

.ie

{
    "1": {
        "src_ip": "192.168.100.5",
        "local_port": 2333,
        "remote_ip": "10.10.10.10",
        "remote_port": 5900,
        "created": "2014-02-06T17:28:29+02:00",
        "updated": "2014-02-06T17:28:29+02:00"
    }
}

To delete a connection

Do a delete request to http://127.0.0.1:3000/ws?id=1

To list connections

Do a get request to http://127.0.0.1:3000/ws

Keywords

FAQs

Package last updated on 12 Mar 2014

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc