https://github.com/maximegris/node-websockify
A simple WebSocket-to-TCP proxy/bridge you can use in NodeJS
https://github.com/maximegris/node-websockify
Last synced: 5 months ago
JSON representation
A simple WebSocket-to-TCP proxy/bridge you can use in NodeJS
- Host: GitHub
- URL: https://github.com/maximegris/node-websockify
- Owner: maximegris
- License: mit
- Created: 2017-02-06T16:20:46.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-06-17T19:26:24.000Z (over 1 year ago)
- Last Synced: 2024-12-04T17:46:22.019Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 40 KB
- Stars: 37
- Watchers: 9
- Forks: 17
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# WebSocket-to-TCP proxy/bridge in NodeJS (forked & inspired by https://github.com/novnc/websockify)
[](https://travis-ci.org/maximegris/node-websockify)
[](https://github.com/maximegris/node-websockify/blob/master/LICENSE.md)
Node-websockify is a WebSocket-to-TCP proxy/bridge you can use in a NodeJS program.
As said it is inspired of the javascript library of https://github.com/novnc/websockify. Unfortunately this library can't be used directly in a nodeJS program. Thats the reason why I created this project.
## Usage ##
Import this module in your project
```bash
npm install --save @maximegris/node-websockify
```
Require the module and call the main function in your program code
```javascript
var websockify = require('@maximegris/node-websockify');
websockify({
source: 'url:port',
target: 'url:port',
web : './directory',
cert: 'certSSL',
key: 'certSSL-key'
});
```
Example :
```javascript
var websockify = require('@maximegris/node-websockify');
websockify({ source: '127.0.0.1:8080', target: '192.168.0.100:5900'});
```
## Options ##
| Alias | Values | Default |
|---|---|---|
| source | URL of websocket Server | null |
| target | URL of the VNC Server | null |
| web | Directory of static sources exposed by the server | null (optional) |
| cert | Path of the SSL certificate | null (optional) |
| key | Key of the SSL certificate | null (optional) |