Adaugă codul complet al proiectului underchat-ircd

This commit is contained in:
mihaiitdata committed 2026-02-13 00:04:12 +02:00
1 parent caba5224bf
commit 5fdc1cc27c
462 files changed
+164488

No files matched your search

+116
View File
@@ -0,0 +1,116 @@
General {
name = "%IRCD_GENERAL_NAME%";
description = "%IRCD_GENERAL_DESCRIPTION%";
numeric = %IRCD_GENERAL_NUMERIC%;
};
Features {
"LOG" = "SYSTEM" "FILE" "ircd.log";
"LOG" = "SYSTEM" "LEVEL" "CRIT";
};
Admin {
Location = "%IRCD_ADMIN_LOCATION%";
Contact = "%IRCD_ADMIN_CONTACT%";
};
Class {
name = "Server";
pingfreq = 1 minutes 30 seconds;
connectfreq = 5 minutes;
maxlinks = 1;
sendq = 9000000;
};
Class {
name = "LeafServer";
pingfreq = 1 minutes 30 seconds;
connectfreq = 5 minutes;
maxlinks = 0;
sendq = 9000000;
};
Class {
name = "Local";
pingfreq = 1 minutes 30 seconds;
maxlinks = 100;
sendq = 160000;
};
Class {
name = "Opers";
pingfreq = 90;
connectfreq = 0;
maxlinks = 100;
sendq = 160000;
whois_notice = no;
remove = no;
freeform = no;
hide_channels = no;
local_opmode = no;
force_local_opmode = no;
walk_lchan = no;
deop_lchan = no;
mode_lchan = no;
shun = no;
local_shun = no;
gline = no;
local_gline = no;
zline = no;
local_zline = no;
hide_idle = no;
xtraop = no;
snomask = 5645;
remote = yes;
};
Class {
name = "Users";
pingfreq = 1 minutes 30 seconds;
maxlinks = 4000;
sendq = 160000;
usermode = "x";
};
# This is an "I line" block. This one lets everyone in.
Client {
ip = "*";
host = "*";
# username = "*";
class = "Users";
};
Port {
port = 4497;
server = yes;
ssl = yes;
};
Port {
port = 16667;
};
Port {
port = 6667;
};
Port {
port = 7000;
};
Port {
port = 6697;
ssl = yes;
};
Port {
port = 9998;
ssl = yes;
};
# Do NOT remove the following lines; linesync.sh depends on them!
# BEGIN LINESYNC
# You need to get linesync running so the rest of the net's config will be appended after this.
# END LINESYNC
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
set -e
docker build -t rubinlinux/nefarious2:`git describe --long --always` -t rubinlinux/nefarious2:latest .
docker push rubinlinux/nefarious2:`git describe --long --always`
docker push rubinlinux/nefarious2:latest
+58
View File
@@ -0,0 +1,58 @@
#!/bin/bash
# Nefarious IRCd Docker Entrypoint
# Reads base.conf-dist, replaces all %VARIABLE% placeholders with environment
# variable values, and writes out base.conf
BASECONFDIST=/home/nefarious/ircd/base.conf-dist
BASECONF=/home/nefarious/ircd/base.conf
IRCDPEM=/home/nefarious/ircd/ircd.pem
# Set defaults for required variables (can be overridden by environment)
: "${IRCD_GENERAL_NAME:=localhost.localdomain}"
: "${IRCD_GENERAL_DESCRIPTION:=localhost.localdomain}"
: "${IRCD_ADMIN_LOCATION:=Somewhere}"
: "${IRCD_ADMIN_CONTACT:=root@localhost}"
: "${IRCD_GENERAL_NUMERIC:=1}"
# Copy the template to base.conf location
cp "$BASECONFDIST" "$BASECONF"
# Find all %VARIABLE% placeholders in the config and substitute them
# with corresponding environment variable values
grep -oE '%[A-Za-z_][A-Za-z0-9_]*%' "$BASECONF" | sort -u | while read -r placeholder; do
# Extract variable name (remove the % signs)
varname="${placeholder:1:-1}"
# Get the value from environment (indirect expansion)
value="${!varname}"
# Only substitute if the variable is set
if [ -n "$value" ]; then
# Escape special characters for sed (/, &, \)
escaped_value=$(printf '%s\n' "$value" | sed -e 's/[\/&]/\\&/g')
sed -i "s|${placeholder}|${escaped_value}|g" "$BASECONF"
else
echo "Warning: No value set for ${varname}, leaving ${placeholder} unchanged"
fi
done
echo "Generated $BASECONF from template"
#If cmd is the ircd...
if [ "$1" == "/home/nefarious/bin/ircd" ]; then
# Generate a pem file if there isnt one...
if [ ! -f /home/nefarious/ircd/ircd.pem ]; then
echo "Generating self signed ssl key for ircd.pem"
openssl req -new --x509 -days 365 -nodes -out ircd.pem -newkey rsa:4096 -keyout ircd.pem -subj "/CN=$IRCD_GENERAL_NAME/"
test 1 -eq 1 || test ! -f /dev/urandom || openssl gendh -rand $1/ircd.rand 512 >> $1/ircd.pem
test 1 -eq 1 || test -f /dev/urandom || openssl gendh 512 >> $1/ircd.pem
openssl x509 -subject -dates -fingerprint -noout -in $IRCDPEM
fi
fi
#Now run CMD from Dockerfile...
exec "$@"
+5
View File
@@ -0,0 +1,5 @@
include "base.conf";
include "ircd.conf";
include "linesync.conf";
View File
Whitespace-only changes.
+4
View File
@@ -0,0 +1,4 @@
# Do NOT remove the following lines; linesync.sh depends on them!
# BEGIN LINESYNC
# You need to get linesync running so the rest of the net's config will be appended after this.
# END LINESYNC