# @mtnbgx/ws-tcp-bridge

> Proxy between websocket and tcp servers

Latest version **1.0.0** (published 2022-07-28) · BSD license · 0 weekly downloads

## Install

```sh
npm install @mtnbgx/ws-tcp-bridge
pnpm add @mtnbgx/ws-tcp-bridge
yarn add @mtnbgx/ws-tcp-bridge
bun add @mtnbgx/ws-tcp-bridge
```

Provides the command `ws-tcp-bridge`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2022-07-28 |
| First published | 2022-07-28 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 6.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 80 |
| Author | andrewchamberss@gmail.com |
| Maintainers | mtnbgx |
| Keywords | websockets, ws, proxy, tcp |

## Links

- npm: https://www.npmjs.com/package/@mtnbgx/ws-tcp-bridge
- Repository: https://github.com/andrewchambers/ws-tcp-bridge
- Homepage: https://github.com/andrewchambers/ws-tcp-bridge#readme
- Issues: https://github.com/andrewchambers/ws-tcp-bridge/issues
- npm.io page: https://npm.io/package/@mtnbgx/ws-tcp-bridge

## Dependencies (2)

- [ws](https://npm.io/package/ws.md) ^8.8.1
- [optimist](https://npm.io/package/optimist.md) ~0.3.5

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2022-07-28

## README

ws-tcp-bridge
=============

Project status:
 currently not in use  so i dont know if its up to date with its dependencies. Feel free to use the code as an example however
 the only licensing restriction is let me know if its been helpful! 

A websocket to tcp proxy server, using nodejs which bridges websockets and tcp servers in either direction.

WIP - the actual code is extremely simple, but not tested well (YET), feel free to help.
	  working examples will be provided with some real services when I get time. 
*NOTE* - currently I only support binary ws frames which isnt implemented in alot of browsers...
A workaround is simple to implement.

INSTALL -

nodejs must be installed first before using this server.

#install to current directory
 npm install ws-tcp-bridge
./node_modules/.bin/ws-tcp-bridge

#or install globally
npm install -g ws-tcp-bridge
ws-tcp-bridge

example -

$ ws-tcp-bridge --method=ws2tcp --lport=8080  --rhost=127.0.0.1:8081

proxy mode ws -> tcp
forwarding port 8080 to 127.0.0.1:8081


$ ws-tcp-bridge --method=tcp2ws --lport=8080  --rhost=ws://127.0.0.1:8081

proxy mode tcp -> ws
forwarding port 8080 to 127.0.0.1:8081


If you want to have negotiation of the target address consider forwarding to a socks5 proxy


> forked from andrewchambers/ws-tcp-bridge

---
_Source: https://npm.io/package/@mtnbgx/ws-tcp-bridge · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
