Last active
February 13, 2022 19:35
-
-
Save Mic92/98605c68b6317abf8f4450cad275bbf1 to your computer and use it in GitHub Desktop.
Proof of concept for sharing tmux with wormhole port forwarding based on https://github.com/magic-wormhole/magic-wormhole.rs/pull/135/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eux -o pipefail | |
export PATH=$(pwd)/target/debug:$PATH | |
wormhole forward connect --port=2010 "$1" & | |
sleep 10 | |
socat file:`tty`,raw,echo=0 tcp-connect:localhost:2010 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eux -o pipefail | |
export PATH=$(pwd)/target/debug:$PATH | |
socat exec:"tmux attach",pty,raw,echo=0,stderr,setsid,sigint,sane \ | |
tcp-listen:2010,bind=localhost,reuseaddr & | |
wormhole forward serve localhost:2010 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment