7 ms·
Goircd: Minimalistic simple IRC server written on Go
- MrGilbert 6y agoI get an invalid certificate, as the root ca is ca.cypherpunks.ru, which is not trustworthy. You might want to look into that, because I like the idea. :)
- clarry 6y agoI also like the idea of being my own CA instead of pretending a bunch of random companies are trustworthy.
- rakoo 6y agoWhat's the point ? This effectively makes the whole encryption worthless, might as well serve your site in plain HTTP
- KCUOJJQJ 6y agoThe visitor cannot be sure that he really is connected to git.cypherpunks.ru. But doesn't encryption work anyway?
- rakoo 6y agoEncryption is active with a host you don't know. It's TOFU, which is OK if you can verify the identity through persistent uses (ie with SSH you'll have connections with the same server over a long period of time, or with IM you'll talk to those people over a long period of time). In the case of HTTP you'll only get the content now and potentially not visit the site anymore for a long time, especially if it's a personal site. A few years ago self-signed certificates made some sense, today with Let's Encrypt there is absolutely no good reason to continue doing this on the open web
- jphoward 6y agoLink appears broken, but hopefully this is it: https://github.com/ThomasHabets/goircd https://github.com/ThomasHabets/goircd
- pikzel 6y agoLast commit: 6 years ago
- thinkmassive 6y agoRepo linked in OP (git.cypherpunks.ru) has commits from 2019. Last commit to the GitHub repo was 6 years ago.
- deleted 6y ago[deleted]
- diath 6y agoIRC-anything gets thumbs up from me, I always thought that IRC bots are a great way to learn a new language, just a nice project that you could do in a day that would teach you the basics of the language, string manipulation, networking and some stuff here and there, an IRC daemon is taking it a step further. This looks very nice but it really is minimal as the title claims, personally I've been working on one to learn Rust which is more featureful at this point but as it turns out the IRC protocol and server handling is much more complex once you get into the details than it normally seems for such a simple protocol.
- omribahumi 6y agoThat's what I've been doing since I was 12 years old :) My first "programming" experience was with mIRC scripts. I even wrote an IRC client using mIRC sockets at some point, and a dummy webserver / SMTP client. When you do things the wrong way, you pick up a lot of new skills. I learned to "reverse engineer" (my implementations were trivial, not fully fledged) protocols with a proxy/sniffer pretty early :) From there, the first use case I had for every new language I wanted to learn was write an IRC bot. I had written one in VB6, VB.NET, Python and even C/C++ at some point. It's funny to see this comment on HN, as this has been my mantra for a while now. On top of string manipulation and networking, another important piece it teaches you about a language is using data structures and manipulating data. IRC client is super stateful. For example, it needs to maintain the list of channels you're in, the list of users in those channels, their op/voice status, etc. Highly recommended as a project for picking up a new language.
- paddez 6y agoI really wish I kept my mIRC scripts somewhere. It'd be interesting to see how I progressed.
- gspr 6y agoMe too! I will never forget adding "runtime loadable moduels" to my PHP IRC bot at age ca. 14. Oh my was that functionality a travesty: a user might say something like `!load poll` to activate the poll module. What would my code do? Oh it'd `include poll.php` (or whatever the syntax is, this was both my first and my last PHP project) in the main loop. On every iteration. Because hey, how else would the poll code be able to react to stuff? I learned a lot of lessons and still have fond memories 20 years later :-) Edit: Man, just thinking at this has Metallica playing as background music in my head even though I haven't listened to them in this decade. It's so strange how childhood memories can be so incredibly strong and cover so many sensory modalities. These days I can hardly remember what I did last week.
- daneel_w 6y agoWe have been running this for several years for the IRC service in our closed community "cloud". It is unfortunately subject to many bugs, some of which affect its stability. It crashes regularly.
- dewey 6y agoAny specific reason why you keep up with that instead of just using another one of the very minimal servers like https://ngircd.barton.de https://ngircd.barton.de?
- detaro 6y agoAnother IRC server written in Go, probably less minimalist though: https://github.com/oragono/oragono https://github.com/oragono/oragono Been running it for quite a while now without troubles (but only few internal users, so not particularly challenging)
- baruchel 6y agoA very nice thing with oragono is that you can configure it for replaying last messages again when an user (re)connects.
- dijit 6y agoI think that's now a standardised feature in IRCv3 compatible servers.
- slingamn 6y agoI'm one of the Oragono maintainers. Thanks for the kind words :-) You're correct, we're not trying to be minimal at all, more "batteries-included". The largest deployments so far are in the low hundreds of users, with no performance or stability problems. Based on my stress testing I'd say an instance can scale comfortably to 10k clients, with at most 2k clients per channel.
- detaro 6y agoThanks for making Oragono! I've been meaning to upgrade my setup with some of the newer features, but honestly the binary I installed years ago just runs so it hasn't been a priority :)
- antirez 6y ago500 lines of code IRC server I wrote in Tcl in 2004: https://github.com/antirez/tclircd/blob/master/ircd.tcl https://github.com/antirez/tclircd/blob/master/ircd.tcl IRC simplicity is magical.
- sitkack 6y agoWhat impact did IRC have on the design of Redis? You have spoken about the simplicity of Tcl, are there other systems that you think have interesting design properties?
- antirez 6y agoI believe IRC and other old school text based protocols definitely inspired the idea of the protocol itself. But there is also kinda of a complementary aspect to that: in the past I had to write, for work, things like a non blocking POP3d for busy mail servers. The way the normal implementations worked was pretty terrible, so I developed a lot of appreciation for event-driven designs like the one in Redis, that tend to be very efficient. About IRC and the other text based protocols of the early days of Internet, I always thought that their inefficiency for certain tasks was never about the fact of being text-only, but because of the lack of prefixed length information. No prefixed length means two terrible things, an EOF signal of some kind but especially a way to quote such EOF in case it is present in the data part itself. Then HTTP arrived and showed that it was possible to do great things with text protocols, and now, the irony, it is a binary one as well :-D So Redis uses a prefixed-length but otherwise textual protocol for this reasons.
- secure 6y agoShameless plug for https://robustirc.net/ https://robustirc.net/, which is also written in Go, and solves netsplits (between servers, and also between client and servers when clients use the RobustIRC bridge or a compatible client) :)
- dijit 6y agoHad to check the authors file[0] to realise you're one of the authors. Wow! I'd like to say a resounding thanks. I've been looking at this system recently and I'm going to be including robust IRC access to my network (shameless plug[1]). The code is clean, I think I have a good understanding of how it works and from my testing it does seem to work really well! That said, have you looked at how much of your original problem space is solved by IRCv3? [0]: https://github.com/robustirc/bridge/blob/master/AUTHORS#L10 https://github.com/robustirc/bridge/blob/master/AUTHORS#L10 [1]: ircs://irc.darkscience.net:6697/darkscience
- secure 6y agoThanks, I’m very glad to hear! I had looked at IRCv3 briefly when starting the project, but it looked like IRCv3 didn’t solve netsplits. Have I overlooked anything (or has something changed), or did you just ask out of curiosity? Keep me posted regarding how RobustIRC is going for your network!
- microcolonel 6y ago> ...but it looked like IRCv3 didn’t solve netsplits Darned CAP theorem.
- slingamn 6y agoClarification, I'm the one of the maintainers of Oragono [1], an IRCv3 server project, but I don't speak for IRCv3 as a whole. In fact, I think my take is somewhat controversial in the IRCv3 community. But here goes: 1. Most of the big problems with IRC as a protocol (nicknames, ghosting, missed messages) come from the assumption that the core of the network should be stateless. If the core of the network is stateless, you can't have nickname reservation, you can't transparently attach two clients to the same nickname, and you can't replay missed messages to people who were disconnected (hence the need for clients to maintain a TCP connection to the server at all times, hence netsplits being disruptive, etc.). 2. Conventional IRC setups solve some of these problems by adding a single privileged node, the "services framework" (Anope and Atheme are examples), that stores some persistent state (typically, nickname and channel reservations). This actually abandons the high-availability properties of the original IRC design: it is theoretically possible to design a highly available services framework (using a clustered database or whatever) but AFAICT none of the frameworks that currently exist are HA. 3. Oragono is a single instance that provides an integrated IRC server, services framework, and "bouncer" (history retention and playback). Client connectivity problems are solved by allowing transparent reattach to the original nickname after authentication with SASL, then automatically replaying history. (Client support for this is still patchy [2], but anything that supports znc.in/playback [3], like Textual, will work well; you can also configure Oragono to try and track what you missed and replay it on reconnection.) 4. To make Oragono highly available, it can be deployed in Kubernetes (virtualizing the embedded database file and the external IP, spinning up a replacement instance on failure). [1] https://github.com/oragono/oragono https://github.com/oragono/oragono [2] https://github.com/ircv3/ircv3-specifications/pull/393 https://github.com/ircv3/ircv3-specifications/pull/393 [3] https://wiki.znc.in/Playback https://wiki.znc.in/Playback
- juliend2 6y agoAre there any startup or community out there who are still using IRC? If so, what are the reasons? I wonder what are the advantages of that over newer technologies like Slack, Discord, or even XMPP.
- dijit 6y agocommunity leader here, we have 500 or so people on the network, I can give my reasons. IRC vs Slack: No brainer, Slack is a hosted application that can change its client on a whim. Bot functions are nice but moderation tools are severely limited and the client is very heavy. IRC vs Discord: Similar to Slack in nearly all regards, however it's better at being what slack was supposed to be I think. It definitely is "eating my lunch" compared to Slack. But the same rules apply, it's very heavy and you have no control of the client. IRC vs XMPP: XMPP is great. The clients for it are relatively good, the protocol, while XML-y is good, but the bot tools are not very good, and federating is hard given the XEP fiasco. Additionally, most existing clients treat XMPP as a IM platform and do not focus on chatrooms. Why IRC then: Well, the truth of it is that if you're sitting on a wired, stable connection then IRC as a text based instant messaging chatroom system is really good. It has no "frills" like emoji responses or threading. No avatars, nor does it force your client to render anything in a specific way. You're free to use what you want. If you want inline images, there's a client that does that. If you want to have a persistent presence, searchable backlog then there's bouncers, or a managed service that does that[0]. If you want a terminal experience that is lean and stripped, or a big fat client that grabs gravatar emails from nickserv registered accounts to display them as avatars, it's possible, anything is possible. And that possibility also exudes the hacker culture. IRC also does not require an account of any kind, this can lead to some measures of abuse, but due to the very good (though, admittedly hard to use) moderation tools you can have many different ways of managing the community, from shadow banning people, to muting channels, to invitation only channels or passwords- all the way to channel or network level blocks on usernames/IPs. Also: nostalgia and I've configured the client how I like it[1] [0]: irccloud.com [1]: https://xkcd.com/1782/ https://xkcd.com/1782/
- juliend2 6y ago> [1]: https://xkcd.com/1782/ https://xkcd.com/1782/ That made me LOL so loud. Thanks for your very thoughtful response. Appreciated.
- jchw 6y agoCool! I wrote an IRC server in Python Twisted some years ago, can’t seem to find the code anymore but I love how simple IRC is. I hope the protocol fragmentation has improved somewhat with efforts like IRCv3.
- sys_64738 6y agoI wrote an IRC client with one line in a shell script back in the 90s.
- Pmop 6y agoLots of things going on with Go. Do you people recommend using Go for back-end, despise its controversial design decisions?
- cellularmitosis 6y agoReach for golang when performance is the priority. Reach for a dynamic lang when speed of feature iteration is the priority.
- qqssccfftt 6y agoAny situation where you would use Go, use Java.
- juped 6y agoImagine all the bandwidth that could have been saved over the years if Jarkko had called PRIVMSG MSG instead.
- txdv 6y agoan irc message usually fits in an mta, i doubt you can justt count 4 bytes for every message