Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/isobit/ws-tcp-relay
A simple relay between WebSocket clients and TCP servers
https://github.com/isobit/ws-tcp-relay
bridge golang proxy relay tcp websocket websocket-server websocketd websockets
Last synced: 3 months ago
JSON representation
A simple relay between WebSocket clients and TCP servers
- Host: GitHub
- URL: https://github.com/isobit/ws-tcp-relay
- Owner: isobit
- License: mit
- Created: 2016-04-01T19:18:31.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2020-11-03T07:54:37.000Z (about 4 years ago)
- Last Synced: 2024-08-02T15:47:50.215Z (6 months ago)
- Topics: bridge, golang, proxy, relay, tcp, websocket, websocket-server, websocketd, websockets
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 243
- Watchers: 12
- Forks: 60
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ws-tcp-relay
[![License MIT](https://img.shields.io/npm/l/express.svg)](http://opensource.org/licenses/MIT)
[![Go Report Card](https://goreportcard.com/badge/github.com/isobit/ws-tcp-relay)](https://goreportcard.com/report/github.com/isobit/ws-tcp-relay)An extremely simple relay/bridge/proxy between WebSocket clients and TCP servers. Data
received from WebSocket clients is simply forwarded to the specified TCP
server, and vice-versa. In other words, it's
[websocketd](https://github.com/joewalnes/websocketd), but for TCP connections
instead of `STDIN` and `STDOUT`.## Usage
```
Usage: ws-tcp-relay
-b Use binary frames instead of text frames
-binary
Use binary frames instead of text frames
-p uint
The port to listen on (default 4223)
-port uint
The port to listen on (default 4223)
-tlscert string
TLS cert file path
-tlskey string
TLS key file path
```### Binary Data
By default, `golang.org/x/net/websocket` uses text frames to deliver payload
data. To use binary frames instead, use either the `b` or `binary` flags.### WSS Support
To use secure WebSockets simply specify both the `tlscert` and `tlskey` flags.## Installation
```
go get -u github.com/isobit/ws-tcp-relay
```Binaries are also available on the [release page](https://github.com/isobit/ws-tcp-relay/releases/).