mhzed/wstunnel

Tunnel stdio (feature request)

Closed this issue · 2 comments

Hi,
I am using this currently to tunnel SSH out of work and it works very well, thank you :)

One thing that I would like is if I could call it from ssh as a proxy command, eg..
ssh -o ProxyCommand="wstt -t stdio:%h:%p --proxy http://1.2.3.4 ws://5.6.7.8:1234" foo@bar.com

I did have a look at modifying myself but my NodeJS is minimal and CoffeeScript is non-existent :(

My approach was going to be to form a duplex stream from stdin/stdout, then replace @tcpserver with above stream (and skip the listen part).

mhzed commented

Good suggestion. Turns out it's very easy to add and I've just committed and npm published the latest change.

Thanks, that does the job.

However, one thing I've noticed with it is that it still hangs around once you close the connection, eg..
./bin/wstt.js -c -t stdio:ssh.server:22 ws://websocket.host:1234
Warning: Native modules not compiled. XOR performance will be degraded.
Warning: Native modules not compiled. UTF-8 validation disabled.
[Oct 13 2016 17:45:14.022 GMT+1030] Websocket tunnel established
SSH-2.0-OpenSSH_6.6.1_hpn13v11 FreeBSD-20140420

[Oct 13 2016 17:45:15.589 GMT+1030] Tunnel closed

This doesn't seem to be an issue for SSH, but it might affect other uses.