Closed adamgoose closed 1 year ago
The server code is not open-source, at least as of now.
There will be client-side encryption eventually, probably in the next release, so that may make it okay for your use case.
Also, there are similar tools that are open-source that are meant to be self-hosted, e.g. http://rtail.org/
+1 would love to see something we can host internally. Open source ideally, but something containerized or that can be installed on a server would work too.
@anishathalye Any chance of open-sourcing seashells? I can bet that you will not get rich making it into a business but at least you could get some fame by making the server open-source.
Otherwise I am afraid that there is a high chance that this would join the other pile of abandonware solutions.
I agree with @ssbarnea. It would be awesome to see Seashells open-sourced.
It's on the to-do list, now. There is some cleanup that needs to be done with the server-side code before release. And documentation needed too.
@anishathalye You got yourself a supporter before you ever released the code!
Don't worry too much about code style stuff, it can be fixed later. I will be happy to help especially in areas like CI (Travis, alike), packaging as container (best way to distribute it).
I do even have few cool features in mind, like server discovery based on your local DNS so you would not be forced to have a config file (or environment variable) that would tell it where to upload to.
I hope that the open-source license would be a liberal one which would allow it to be reused in other projects, like Apache. I am asking this because I already have in mind potential use on project like https://www.zuul-ci.org/
I was thinking AGPL (which I generally use for web-apps, e.g. see Gavel).
Any updates on this?
I do not have any plans to start a hosting project and to build a business around sharing console outputs. I also doubt anyone sane woudl desire the same as they are unlikely to ever reach a profit.
For these reasons I am inclined to look from a different perspective: avoid using any lincense that could deter others from using the library/tool, regardless their intentions (even including in commercial products). I seen too much s*** around these days around free-software no longer be free (mongo,...) and for this reason I would personally avoid using controversial licensing, ones that are incompatible with others because my aim was to make my code freely available to anyone. Wikipedia states the AGPL is incompatible even with GPL,... so maybe is not ideal. Probably LGPL,MPL,Apache,BSD being more relaxed.
Meanwhile I should order a second candle for the upcoming birthday of this ticket.
It's simple enough to create your own gotty/seashells clone.
Install websocat
:
$ brew install websocat
In terminal 1: Start a websocket server to receive piped data:
$ websocat -t ws-l:127.0.0.1:9000 broadcast:mirror:
In terminal 2: pipe your terminal to the websocket:
$ exec > >(tee >(websocat -n ws://127.0.0.1:9000/)) 2>&1
Here's the HTML page with the websocket listener. Serve this page up and you'll see your terminal output being streamed:
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<link href="https://cdnjs.cloudflare.com/ajax/libs/xterm/3.12.2/xterm.css" rel="stylesheet" />
</head>
<div id="terminal"></div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xterm/3.12.2/xterm.js"></script>
</body>
<script>
var term = new Terminal({
convertEol: true,
disableStdin: true,
drawBoldTextInBrightColors: true,
})
term.open(document.getElementById('terminal'))
var mySocket = new WebSocket ('ws://localhost:9000/')
mySocket.onopen = event => console.log('open')
mySocket.onmessage = event => term.write(event.data)
mySocket.onclose = event => console.log('close')
</script>
</body>
</html>
Instead of websocat, you can do the same with your favorite programming language and store the streamed data for persistency where on each connection you respond with the stored data. You can also generate a random id for each connection request and map them to a path.
Alternatively, you can also use streamhut
which is similar to seashells
@miguelmota Your last stetement if far from true. Streamhut stream a terminal, is has not support for uploading console log to a web server where it can be accessed by anyone at a later time. Only solutions that generate an unique URL when you start would be able to do that.
@ssbarnea ?
exec > >(nc stream.ht 1337) 2>&1
@miguelmota ok, so I can share a terminal. Still, I am unable to figure out how to share only the console output from a command as "live log", not the terminal itself. The terminal itself is useful only for some TUI apps, but user cannot really scroll it as a web page.
@ssbarnea I see, so like:
tail -F file.log | nc stream.ht 1337
Btw here's a gist I put together containing a [wip] table comparison of all web-based terminal sharing applications I could find.
Hi guys, you may consider using gotty,choose your os release version ,unpack it, and cp to /usr/bin
or /usr/local/bin
then perform the following operation:
mkcert <your server ip> # generate pem and key file for https
alias gow ="gotty -r -c 'user:password' -a <your server ip>--reconnect --max-connection 10000 --title-format <your title> --close-signal 1 --close-timeout 1 \
-t --tls-crt /path/to/<your server ip>.pem --tls-key /path/to/<your server ip>-key.pem" # you can put it in ~/.bashrc
now just use gow <your command>
,it will output http server listenning: http://
Finally got around to doing this: https://github.com/anishathalye/seashells-server.
I'd love to use this tool internally, but we won't be able to use the hosted solution. Is your server source code open-sourced?