Awesome
termishare
Peer to peer terminal sharing
The motivation behind termishare is to provide a safe and fast way to access a remote terminal.
In order to achieve that, termishare uses a combination of WebSocket and WebRTC:
- WebSocket - is used only for signaling - which is a process to establish WebRTC connection
- WebRTC - the primary connection to stream your terminal to other clients
Getting started
Install
Using brew
brew tap qnkhuat/tap && brew install termishare
Using release
- Go to our release page and get a pre-built binary of
termishare
. Make sure you get the one that match your OS. - Untar the package
tar -xzf termishare_x.y.z.tar.gz
- (Optional) Move it to
/usr/local/bin
folder so that you could usetermishare
anywhere :mv termishare /usr/local/bin
Usage
- To start a sharing session, just run
termisnare
- Termishare will echo out a connection url you can use to connect via:
- browser
- terminal with command :
termishare {{connection_url}}
Note
There are chances where a direct peer-to-peer connection can't be established, so I included a TURN server that I created using CoTURN.
If relay to the TURN server is something you don't want, you can:
- Disable the usage of turn server (with
-no-turn
flag) - Creates your own TURN server connect to it by changing in cfg/termishare.go then re-compile termishare (sorry)
Self-hosted
Termishare server is a jar file, it contains both the signaling server and the UI, so it's fairlly simple to self-host termishare:
- Install java
- Download
termishare.jar
from our release page - Start it with
java -jar termishare.jar
, by default it'll start atlocalhost:3000
. You can useTERMISHARE_HOST
andTERMISHARE_PORT
env to change the default values. - Now you can connect to your server using termishare with
termishare -server localhost:3000
Upcoming
- Move both the front-end and server to server as one
- Connect to termishare session via
termishare
itself, instead of web-client - Install via brew/apt
- Customize TURN server
- Approval mechanism