TimeToogo / tunshell

Remote shell into ephemeral environments 🐚 🦀
https://tunshell.com
MIT License
767 stars 56 forks source link

Add a separate website page for direct connecting with peer key and encryptionSecret #34

Closed NyaMisty closed 2 years ago

NyaMisty commented 2 years ago

Thanks for your brilliant work. I'm currently investigating the possibility to use tunshell in Github Actions in a better way. With a simple POST, people can simply retrive a pair of peer-key, but with peer key, users cannot make use of tunshell's browser shell. At the same time, tmate will give a direct URL to open a shell.

I've reviewed tunshell website's code and the only place to show a xterm is by clicking the button, which doesn't allow manually specification of keys & secrets, thus users can't use a URL to directly start a session.

Could you please add a webpage to achieve functionality like tmate? Thanks!

TimeToogo commented 2 years ago

Hi @NyaMisty,

Thanks for the suggestion, I agree it could be convenient to have URL's which directly open a client tunshell session in the browser. I've implemented this using the following URL structure:

https://tunshell.com/term#{{peerKey}},{{encryptionSecret}},{{relayServer}}

It's important that they are part of the # anchor so they don't get shared with the servers rendering the pages (even if we somewhat trust them).

You can see this in action by creating a new in-browser session on https://tunshell.com/go and click on the new "Shareable link".