Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yonle/websockify.js
A websockify written in javascript, But with 2 Converting Method.
https://github.com/yonle/websockify.js
novnc tcp websocket websockify
Last synced: about 1 month ago
JSON representation
A websockify written in javascript, But with 2 Converting Method.
- Host: GitHub
- URL: https://github.com/yonle/websockify.js
- Owner: Yonle
- License: isc
- Created: 2021-04-09T17:32:45.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-04-19T09:26:25.000Z (over 3 years ago)
- Last Synced: 2024-09-26T22:38:09.288Z (about 2 months ago)
- Topics: novnc, tcp, websocket, websockify
- Language: JavaScript
- Homepage: https://npmjs.com/package/websockify.js
- Size: 11.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# websockify.js
A websockify written in javascript, But with 2 Converting Method.## API
### `module.tcp`
A function that convert TCP into WS. There's a required parameter's:
- `target`[Object] A TCP Server target to convert to
- `forwardTo`[Object] A websocket `new WebSocket(....)`.#### Example
```js
const { tcp } = require('websockify.js');tcp({
hostname: 'localhost',
port: 8080
}, { port: 9090 });
// Now forwarding tcp://localhost:8080 to ws://localhost:9090
```### `module.ws`
A function that convert WS into TCP. There's a required parameter's:
- `target`[String] A Websocket Server target to convert to
- `forwardToPort`[Number/String] Forward to port?
- `forwardToHostname`[String] ** Forward to hostname?#### Example
```js
const { ws } = require('websockify.js');ws('ws://localhost:8080', 9090, 'localhost');
// Now forwarding ws://localhost:8080 to tcp://localhost:9090
```# Community
- [Discord](https://quickstream.yonle.repl.co/discord)
- [Telegram](https://t.me/yonlecoder)