gotty
gotty copied to clipboard
Looking for something like gotty but designed to be consumed as an HTTP API
Sorry if this doesn't belong here. Feel free to close it in that case, but I figured there's a good chance the gotty devs could help point me in the right direction.
Essentially, I'm looking for a tool to allow a javascript browser library to initiate arbitrary shell command pipelines on a backend server, and stream the results back to the client. It needs to support piping multiple CLI applications together. For example:
const command = jsLib.executeOnServer('ls -l | wc')
command.on('data', (data) => {
...
})
Obivously this is a minefield in terms of security, and I would expect to have to jump through a lot of hoops in order to use it safely (ie maybe limited to only running binaries in a specific directory on the server, whitelisted binaries, chroot, etc).