CLI of multiplexing TCP and UDP using yamux
curl -L https://github.com/nwtgck/yamux-cli-rust/releases/download/v0.3.0/yamux-x86_64-unknown-linux-musl.tar.gz | tar xzf -
./yamux-x86_64-unknown-linux-musl/yamux --help
curl -L https://github.com/nwtgck/yamux-cli-rust/releases/download/v0.3.0/yamux-x86_64-apple-darwin.tar.gz | tar xzf -
./yamux-x86_64-apple-darwin/yamux --help
curl -L https://github.com/nwtgck/yamux-cli-rust/releases/download/v0.3.0/yamux-aarch64-apple-darwin.tar.gz | tar xzf -
./yamux-aarch64-apple-darwin/yamux --help
Other binaries are found in https://github.com/nwtgck/yamux-cli-rust/releases.
... | yamux localhost 80 | ...
... | yamux -l 8080 | ...
... | yamux -U /unix/domain/socket/path | ...
... | yamux -U -l /unix/domain/socket/path | ...
... | yamux -u 1.1.1.1 53 | ...
... | yamux -ul 1053 | ...
Here is a complete simple example, but not useful. This is forwarding local 80 port to local 8080 port.
mkfifo my_pipe
cat my_pipe | yamux localhost 80 | yamux -l 8080 > ./my_pipe
An expected usage of this CLI is to combine network tools and transport a remote port.
Here is more practical usage. The commands below forward 22 port in machine A to 2222 port in another machine B.
# Machine A
curl -sSN https://ppng.io/aaa | yamux localhost 22 | curl -sSNT - https://ppng.io/bbb
# Machine B
curl -sSN https://ppng.io/bbb | yamux -l 2222 | curl -sSNT - https://ppng.io/aaa
https://ppng.io
is Piping Server, which streams data over pure HTTP.