Skip to content

salimnassim/ircd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ircd

Somewhat complex IRC server which implements a subset of RFC1459.

By default the server will run on port 6667 and prometheus metrics are exposed on port 2112. See docker-compose.yml for example environment variable configuration.

Features

IRC Commands

  • TLS
  • CAP
  • PRIVMSG
  • NICK
  • USER
  • JOIN
  • PART
  • TOPIC
  • WHO
  • WHOIS
  • KICK
  • LUSERS
  • PASS
  • OPER (pertial, no commands)
  • LIST (partial, no ELIST)
  • INVITE
  • VERSION (partial, local server only)
  • ADMIN
  • MODE (client: iortz, channel: mspnzt, member: vhoaq)
  • AWAY
  • LINK
  • IRCv3

Environment variables

  • SERVER_NAME (string)
  • SERVER_VERSION (string)
  • PORT (int)
  • PORT_TLS (int)
  • PROMETHEUS (unset is false)
  • TLS (unset is false)
  • TLS_CERTIFICATE (path)
  • TLS_KEY (path)

Installation

Generate TLS Key Pair

mkdir tls && cd tls
openssl genrsa -out servercakey.pem
openssl req -new -x509 -key servercakey.pem -out serverca.crt
openssl genrsa -out server.key
openssl req -new -key server.key -out server_reqout.txt
openssl x509 -req -in server_reqout.txt -days 3650 -sha256 \
 -CAcreateserial -CA serverca.crt -CAkey servercakey.pem -out server.crt

Local

  1. Run go mod download && go build -v -o ./dist/ircd ./cmd.
  2. The binary can be found under the dist directory.
  3. Run with SERVER_NAME=foo SERVER_VERSION=0.1 PORT=6667 ./dist/ircd

Docker

Note: in order for clients to discover their IP address and get the real remote IP address, the server needs to run using the host network driver. If host networking is not enabled all clients will use the Docker gateway address which might lead to interesting situations.

  1. Configure the environment variables in in docker-compose.yml.
  2. Run docker compose up.

Releases

No releases published

Packages

No packages published