WebSocket to TCP proxy written in Rust.
A precompiled binary for Linux environment is available in the [releases] page.
```console $ curl -L https://github.com/sile/wstcp/releases/download/0.1.1/wstcp-0.1.1.linux -o wstcp $ chmod +x wstcp $ ./wstcp -h wstcp 0.1.1 WebSocket to TCP proxy server
USAGE:
wstcp [OPTIONS]
FLAGS: -h, --help Prints help information -V, --version Prints version information
OPTIONS:
--bind-addr
ARGS:
If you have already installed Cargo, you can install wstcp
easily in the following command:
console
$ cargo install wstcp
Run wstcp
in a terminal:
console
$ wstcp 127.0.0.1:3000
Apr 22 23:21:20.717 INFO Starts a WebSocket proxy server, server_addr: 127.0.0.1:3000, proxy_addr: 0.0.0.0:13892
Run a TCP server (in this example nc
is used) in another terminal:
console
$ nc -l 127.0.0.1 3000
Use ws to launch a WebSocket client:
```console $ ws ws://localhost:13892/
foo # Enter "foo" and press the Enter key ```
After this, the "foo" string is displayed on the terminal running nc
.