ngircd
ngircd copied to clipboard
Feature request: Websockets
As of now to have ngircd on websocket I do this:
- I run ngircd on 127.0.0.1:6667
- I use websocat in this way:
websocat -E --text ws-listen:0.0.0.0:8080 tcp:127.0.0.1:6667 -F=/index.html:text/html:index.html -F=/:text/html:index.htmlIt would be greato to be able to do the same directly from ngircd. Note: websocat not only act as a proxy but also offers index.html if the connection is http/https instead of ws/wss.
Any plans to do that? I was thinking to take parts of the source of "ttyd" to implement the websocket part instead of including huge libraries..
Hm … what is you use case for this?
It's already online here: https://irc.dyns.gq hosted on repl.it: https://repl.it/@zibri/ircd
Use case: I think that ircd+websockets is a hundred times better than socket.io No need for nodejs, no need for useless huge libraries. More granularity. All filtering and control options of irc. A solid code base. Perfect for embedded devices or small VMs. I really wonder why people still use socket.io and sh*t like that. If you want to brainstorm about this (it could be a new life for irc servers and ngircd) Drop me an email (zibri at zibri dot org) or find me on facebook (fb dot me slash zibri)
client for testing https://gist.github.com/Zibri/9125281716206a2b4c1b31b2bb8a7467
Hm … not sure what you are talking about. But in the end, I don't think that ngIRCd will "implement Websockets" – whatever that means.
But as usual, prove me wrong by providing patches :-)
Regards Alex
"whatever that means" >>> https://www.unrealircd.org/docs/WebSocket_support
Implementing a websocket listener would entail making ngIRCd handle a certain set of the HTTP protocol until a "protocol upgrade" is initiated. After that, the websocket functions much like a TCP socket. Browsers can open websockets with the IRC server like any TCP client. This is useful as an alternative to webirc since the browser can connect directly to IRC servers this way. This opens up a use-case for ngIRCd to be used perhaps as a "live support" backend without the extra burden of maintaining a webirc bridge.
@alexbarton did you finally learnt "whatever that meant"? or are you still in the dark? :P