An ircd backed by etcd
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cmd IrcdDebugTeeDir directory option to dump incoming client messages. Nov 29, 2017
hack/tls initial commit Oct 18, 2017
internal/util
keyencode initial commit Oct 18, 2017
vendor
.gitignore
LICENSE initial commit Oct 18, 2017
Makefile vendor: fix pflags vendoring and add glide-update makefile rule Nov 14, 2017
Procfile initial commit Oct 18, 2017
README.md initial commit Oct 18, 2017
channel.go
client.go minor cleanups around error handling Nov 20, 2017
config.go
conn.go
etcd_client.go minor cleanups around error handling Nov 20, 2017
glide.lock
glide.yaml vendor: fix pflags vendoring and add glide-update makefile rule Nov 14, 2017
integration_test.go support kick and rudimentary channel modes Nov 20, 2017
key.go
mode.go support kick and rudimentary channel modes Nov 20, 2017
msg.go add linting Nov 8, 2017
oper.go ircdctl: oper mk/rm/ls Nov 14, 2017
security.md support pinning user modes with PinnedUserModes Nov 7, 2017
server.go respect invisible user mode Nov 12, 2017
session.go initial commit Oct 18, 2017
user.go

README.md

etcdircd

An encrypted irc daemon backed by etcd.

Running etcdircd

Install go, then build etcd and etcdircd:

$ go get github.com/heyitsanthony/etcdircd/cmd/etcdircd
$ go get github.com/coreos/etcd/cmd/etcd

Launch an etcd server and an etcdircd server:

$ etcd &
$ etcdircd &

Connect with an irc client:

$ irssi -n mynick --connect localhost

If it all worked, the client will connect and display the welcome banner. See the security guide to encrypt everything.

How it works

An etcdircd server communicates with other etcdircd servers through etcd. Each server receives messages by watching on etcd keys; network disconnection is tolerated by resuming the watches. If an etcdircd server permanently loses contact with etcd, its resources are automatically released through session expiration.

User information is stored under /user/ with a given <nick>. The key /user/ctl/<nick> holds user metadata including modes, name, and joined channels. The key /user/msg/<nick> forwards IRC messages to <nick>'s connection. For example, writing a PRIVMSG message to /user/msg/<nick> will send a private message to <nick>.

Channel information is similar; its keys are prefixed with /chan/ and take a given <channel>. The key /chan/ctl/<channel> holds metadata such as the channel topic. The key /chan/msg/<nick> forwards IRC messages to all users on the channel. To notify channels when users disconnect, joined users are written to per-server keys /chan/nicks/<channel>/<session>; when the session expires, the key deletion event signals server loss and all the server's users are removed from the channel.

Limitations

etcdircd is still under active development. It's enough to chat, but not much else!

etcd backend encryption is missing:

  • Key revocation
  • Key rotation (2^32 messages before risking repeat IV)
  • Replay attack protection
  • Certificates other than 4096-bit RSA
  • Physical attestation

The irc frontend:

  • Many IRC commands and modes
  • Services
  • Server linking

Contact

Use the issue tracker

Or try the etcd channel on freenode.

License

etcdircd is under the AGPLv3 license. See LICENSE for details.