quackduck / devzat

The devs are over here at devzat, chat over SSH!
MIT License
3.52k stars 127 forks source link

feature request: make a simple protocol / API to allow servers to self report, for indexing #84

Open elendee opened 2 years ago

elendee commented 2 years ago

goal: allow for easy browsing of all devzat active installs, similar to 3rd party server lists for discord (see "disboard.org" and others).

the MUD gaming community has something called "global mud protocol" that allows you to ping servers for current status and general server info, if the server admin has implemented it.

basically this would allow devzat to feel like a single, scaled service even as it potentially scales to lots of disparate hosts.

quackduck commented 2 years ago

That’s an interesting idea!

elendee commented 2 years ago

yea even better.. I was thinking this would be a 3rd party listing, a website etc, but you could build it right into devzat core, as long as there was a registry server online for it to ping.

.. although.. that would imply switching SSH sessions, which is probably out of the scope of one devzat install to do, since devzat lives inside one SSH session.

You could run a "devzat hub server" that listed online servers and tunneled people between them, but that would be a lot of bandwidth for you and defeat the purpose of distributing it.. so yea probably some level of client initiative is needed here, where they browse the "hub" listing by themselves and choose between them

l3gacyb3ta commented 2 years ago

Woah, sorta like IRC!

elendee commented 2 years ago

different level of abstraction... IRC is a protocol where devzat is an SSH application

quackduck commented 2 years ago

What server info should be included in a reply to such a ping?

elendee commented 2 years ago

Just self-reported, publicly available info I think. So I'd think

quackduck commented 2 years ago

What do you mean by an owner handle? A GitHub/Twitter username?

elendee commented 2 years ago

I take handle to mean a "URI safe username", similar to a unique key for an asset in a URI often being called a "slug".

I don't think there's a hard definition. But I would call "bob" a username, "bob jones" a name, and "bob#1234" a handle

So yea an email could fall under that category. But since these will likely be public, I'd vote against that

quackduck commented 2 years ago

Yeah we can let the owner decide what they'd like to show. I think we can have this work over HTTP as JSON. We'd need to decide a default port for it.

quackduck commented 2 years ago

I wonder if we could detect an HTTP client on the SSH port and reply with this message instead of the usual SSH exchange.

elendee commented 2 years ago

That does seem ideal yea.
I think the next best option would be digging into some server-side language that has an SSH package, so you could expose it via that. That's what I did for MUD servers, using the node telnet package to repackage all the telnet data into a normal node server. I don't know if SSH has good packages for that though

CodeLongAndProsper90 commented 2 years ago

You can access argv with an ssh command, correct? Just add an option called '--dump-info' and send the info as json across stdout