https://github.com/nwtgck/go-piping-duplex
Duplex communication over Piping Server
https://github.com/nwtgck/go-piping-duplex
bidirectional-communication cli data-transfer duplex-communication golang piping-server
Last synced: over 1 year ago
JSON representation
Duplex communication over Piping Server
- Host: GitHub
- URL: https://github.com/nwtgck/go-piping-duplex
- Owner: nwtgck
- License: mit
- Created: 2020-04-11T02:47:09.000Z (about 6 years ago)
- Default Branch: develop
- Last Pushed: 2022-12-13T18:25:46.000Z (over 3 years ago)
- Last Synced: 2025-02-26T20:11:57.660Z (over 1 year ago)
- Topics: bidirectional-communication, cli, data-transfer, duplex-communication, golang, piping-server
- Language: Go
- Homepage:
- Size: 36.1 KB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# piping-duplex
[](https://github.com/nwtgck/go-piping-duplex/actions/workflows/ci.yml)
Duplex communication over [Piping Server](https://github.com/nwtgck/piping-server)
## Installation
Get executable binaries from [GitHub Releases](https://github.com/nwtgck/go-piping-duplex/releases)
## Usage
Person A and B can communicate as follows.
Person A
```bash
piping-duplex aaa bbb
```
Person B
```bash
piping-duplex bbb aaa
```
### Example 1
```console
$ echo hello | piping-duplex aaa bbb
1
2
3
4
5
6
7
8
9
10
```
Person B
```console
$ seq 10 | piping-duplex bbb aaa | base64
aGVsbG8K
```
NOTE: `aGVsbG8K` is base64-encoded "hello\n".
### Grammar
```bash
piping-duplex
```
### Example SSH
Here is an example to use SSH over HTTPS via Piping Server.
In server host, type as follows.
```bash
socat 'EXEC:piping-duplex aaa bbb' TCP:127.0.0.1:22
```
In client host, type as follows.
```bash
socat TCP-LISTEN:31376 'EXEC:piping-duplex bbb aaa'
````
In another terminal in client host, type as follows.
```bash
ssh -p 31376 localhost
```
## End-to-end encryption
You can use passphrase-based end-to-end encryption with `--symmetric` or `-c` option.
```bash
piping-duplex -c aaa bbb
```
## Specify Piping Server
You can specify Piping Server with `--server` or `-s` option.
```
piping-duplex -s https://piping.glitch.me aaa bbb
```
OR
specify with `$PIPING_SERVER` environment variable as follows.
```bash
export PIPING_SERVER=https://piping.glitch.me
```
## Help
```
Duplex communication over Piping Server
Usage:
piping-duplex [flags]
Flags:
-h, --help help for piping-duplex
-s, --server string Piping Server URL (default "https://ppng.io")
-c, --symmetric use symmetric passphrase protection
-v, --version show version
```