https://github.com/salimnassim/ircd
IRC server
https://github.com/salimnassim/ircd
go irc server
Last synced: about 1 year ago
JSON representation
IRC server
- Host: GitHub
- URL: https://github.com/salimnassim/ircd
- Owner: salimnassim
- License: mit
- Created: 2023-06-27T02:40:54.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-17T14:26:04.000Z (over 2 years ago)
- Last Synced: 2025-02-17T14:14:24.579Z (over 1 year ago)
- Topics: go, irc, server
- Language: Go
- Homepage:
- Size: 272 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
- [X] TLS
- [ ] CAP
- [x] PRIVMSG
- [x] NICK
- [x] USER
- [x] JOIN
- [x] PART
- [x] TOPIC
- [x] WHO
- [x] WHOIS
- [x] KICK
- [X] LUSERS
- [X] PASS
- [X] OPER (pertial, no commands)
- [X] LIST (partial, no ELIST)
- [X] INVITE
- [X] VERSION (partial, local server only)
- [ ] ADMIN
- [X] MODE (client: iortz, channel: mspnzt, member: vhoaq)
- [X] 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`.