Skip to content

Instantly share code, notes, and snippets.

@Mic92
Last active February 13, 2022 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mic92/98605c68b6317abf8f4450cad275bbf1 to your computer and use it in GitHub Desktop.
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/
#!/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
#!/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