1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-12 15:34:47 +02:00
Commit Graph

102 Commits

Author SHA1 Message Date
Bram Matthys be08bc2e33 Let's call it "./unrealircd mkcert" instead (like mkpasswd). Fix test suite. 2026-06-05 16:51:22 +02:00
Bram Matthys 982325fc82 Move "make pem" to "./unrealircd makecert" and make tools use this
and refer to this as well.

Suggested by PeGaSuS in https://bugs.unrealircd.org/view.php?id=6610

This also moves extras/tls.cnf to doc/conf/tls/tls.cnf which
also gets installed in ~/unrealircd/conf/tls/ (or whatever CONFDIR is)

And just to be clear: this means you can run "./unrealircd makecert"
without needing to go into BUILDDIR (or even having it at all).

At the same time, the generation commands have been modified slightly
so two warnings during certificate generation are no longer there.
2026-06-05 16:08:40 +02:00
Bram Matthys 172ace9750 geoip_maxmind: use our own mmdb implementation
This is mainly due to licensing. The libmaxminddb library uses the
Apache license, which meant if we would compile it in by default it
would effectively transform our "GPLv2 or later" to "GPLv3 or later".
Our implementation is ISC licensed, so we can include and enable it
by default and keep things at "GPLv2 or later". This is also why we
used geoip_classic in the first place as default and compiled in,
and not the mmdb variant.

The mmdb.c is based on the specification, using the Go implementation
as a reference during development (ISC licensed), initially implemented
with the help of Claude Opus 4.6. After that substantial changes were
made to make it match UnrealIRCd's style and to make things less error
prone: C style changes, allocation and zero termination of strings in
the library, auto-NULL in variadic functions so the caller cannot
forget NULL there (similar to our unreal_log/do_unreal_log), using
enums as the return type instead of int (similar to curl), adding
doxygen docs, etc.

This also means the old mmdb library dependency has been dropped,
including from configure/autoconf.

At the moment we still use the geoip classic library by default,
including those DB files. The idea is we will switch over sometime
later after this current new MMDB stuff has received more testing.

This also makes us more flexible, since .mmdb files have become the
de-facto standard for pretty much all geoip vendors.
2026-03-22 12:10:18 +01:00
Bram Matthys 3a35689a43 Adjust the "To ensure UnrealIRCd automatically starts on system startup" text
at the end of "make install". Previously it mentioned installing a
Cron job, now it also mentions Systemd.
2025-10-29 10:39:36 +01:00
Bram Matthys cbfcfa1428 Create src/modules/rpc directory 2022-06-19 13:13:33 +00:00
Bram Matthys 39688517b0 Make "./unrealircd rehash" show output on the terminal, same for
"./unrealircd reloadtls" and there is now also a "./unrealircd status"

The output is colorized if the terminal supports it (just like on the
boot screen) and also the exit status is 0 for success and non-0 for
failure. The purpose of all this is that you can easily detect rehash
errors on the command line.

These three commands communicate to UnrealIRCd via the new control
UNIX socket, which is in ~/data/unrealircd.ctl.
This also does a lot of other stuff because we now have an internal
tool called bin/unrealircdctl which is called by ./unrealircd for
some of the commands to communicate to the unrealircd.ctl socket.
Later on more of the existing functionality may be moved to that
tool and we may also provide it on Windows in CLI mode so people
have more of the same functionality as on *NIX.
2022-01-02 20:17:36 +01:00
Bram Matthys 1d73db560c Get rid of modules/snomasks directory, since the snomask module API is gone.
(IRCOps can set any snomask dynamically now)
2021-09-24 10:10:27 +02:00
Bram Matthys 4ef3b9f000 Add BSDmakefile with a note to run 'gmake' for BSD users.
Also, check for GNU make (which can be either 'make' or 'gmake')
early in ./Config and print out an error to install prerequisites
from https://www.unrealircd.org/docs/Installing_from_source

This also replaces 'make' with ${MAKE} (and such) everywhere.
2021-09-04 09:31:30 +02:00
k4be 9c3d5dffb0 Add libmaxminddb support 2021-08-27 14:49:13 +02:00
Bram Matthys 2c7d2c8f86 Split url.c into url_curl.c (curl implementation) and url_unreal
(the new fallback https-only implementation).

./configure will set URL= to either url_curl.o or url_unreal.o
depending on whether curl is enabled or not.

The 3 functions that both implementations had in common are now in
src/misc.c: url_is_valid(), displayurl() and url_getfilename().
2021-08-21 08:47:38 +02:00
Bram Matthys 685e0ee073 In ConfigItem_include include->url now always exists, and src/url.c is now
always compiled in, both regardless of cURL support or not.
Obviously the cURL functions are not available without cURL and there
are now some #ifdef USE_LIBCURL in url.c

This also fixes the current build to work without cURL
2021-08-18 12:27:13 +02:00
Bram Matthys ed7bf1daf5 Bundle with GeoIP classic library and add geoip_classic placeholder.
This library we can safely bundle because it is GPLv2.
2021-08-17 14:11:36 +02:00
Bram Matthys f89348d26c Add JSON logger - initial work 2021-07-12 14:37:25 +02:00
Bram Matthys c586592516 Add -nodes (no DES) to openssl command so it doesn't ask for a
password on OpenSSL 3.0.0 and later when generating the standard
self-signed certificate.
2021-06-28 13:59:27 +02:00
Bram Matthys 5daf7e7ebe Compile with system libsodium, fallback to shipped version.
This library provides easy to use functions for encryption/decryption
among other things. There is some overlap with things that
OpenSSL also provides but not all.
2021-04-09 13:44:31 +02:00
Bram Matthys 0e125abc36 New: "./unrealircd upgrade" to upgrade to latest UnrealIRCd release. 2021-01-10 16:22:33 +01:00
Bram Matthys 5e068a2f28 Add symlink 'source' in the installdir to the UnrealIRCd source.
Useful for scripting purposes.
2020-12-30 13:44:50 +01:00
Robert Scheck ebe0a43828 Add $(DESTDIR) support for 'make install' (#124)
When packaging UnrealIRCd as RPM, 'make install' needs to install
the files into $RPM_BUILD_ROOT rather into '/'. Just changing the
paths via ./Config or ./configure does not fit, because otherwise
UnrealIRCd is finally looking for $RPM_BUILD_ROOT/etc/unrealircd/
rather /etc/unrealircd/. It's fully backwards-compatible, because
normally $DESTDIR is not being passed.
2020-10-19 17:12:46 +02:00
Bram Matthys dfa83aa6e5 Add module manager. See https://www.unrealircd.org/docs/Module_manager
Also update release notes and some unrelated changes.
BIG commits. Lots of work. Requires more testing.
2019-11-01 12:57:12 +01:00
Bram Matthys 5b361e69bb Get rid of configure check for strtoul and the src/strtoul.c file. 2019-09-09 17:49:10 +02:00
Bram Matthys 2b0afacdf0 Rename of "ssl" to "tls" part 2 2019-08-12 14:35:32 +02:00
Bram Matthys 09cf485d6c Mass rename of "ssl" to "tls" everywhere. Including conf/ssl to
conf/tls. If you are upgrading then conf/ssl will be renamed to
conf/tls and a symlink will be added (so certbot etc won't fail).
This is part 1...
2019-08-12 14:26:31 +02:00
i dbbcc6918a Fix Custom OpenSSL library path was ignored 2019-07-11 00:53:41 +03:00
Bram Matthys fea09b6659 Switch from RSA 4096 to ECC secp384r1 2019-06-30 10:53:58 +02:00
Bram Matthys d3d9b499a7 Move src/ssl.cnf -> extras/ssl.cnf
[skip ci]
2019-06-30 10:25:19 +02:00
Bram Matthys e90f6e0446 Remove 'make encpem'. Nobody uses this as it would mean you always need
to enter the private key password when UnrealIRCd is (re)started.
Similarly, remove all references to it on Windows as well, where people
thought clicking "Encrypt private key" was a good idea. Can't blame them,
it sounds good on first sight :D
[skip ci]
2019-06-30 10:23:15 +02:00
Bram Matthys f0f0a93cc5 Makefile: makes no sense to create modules/cap only to remove it later
[skip ci]
2019-06-22 17:57:42 +02:00
Bram Matthys 5ad0278f9e No longer check for big enough FD_SETSIZE. We all use poll/kqueue/epoll/etc now. 2019-06-07 12:39:39 +02:00
Bram Matthys 5513b21936 Remove old extras/regex 2019-05-25 10:50:01 +02:00
Bram Matthys 1108b58951 Remove old TRE regex engine. Hasn't been maintained since 2010
and has various outstanding crash and 100% CPU issues.
We have been encouraging the PCRE2 engine since the start of
UnrealIRCd 4 already.
TRE is being phased out of U4 by the end of the year, so we can
safely remove it in U5 already.
2019-05-25 10:42:46 +02:00
Bram Matthys 185b4e05c0 Whoops, this #comment in 'make install' showed up to end-users. 2019-05-25 10:19:33 +02:00
Bram Matthys c3a929646c Move src/modules/cap/* to src/modules/ as the meaning got blurred.
For example, msgid / message-ids is not a CAP, while server-time is.
There mere fact of something being in CAP or not shouldn't cause
something to be in different directories ;).
2019-05-19 15:58:34 +02:00
Bram Matthys 4e75af79fa 'make install' will now upgrade the spamfilter.conf examples from
'posix' to 'regex' if the user is using the exact same spamfilter.conf
that shipped with UnrealIRCd 4.x until now. Otherwise, we do not
update anything. Also, custom spamfilters in this file are not touched.
Let's hope this will apply to most of our users to ensure that they
will have no or less issues with the 'posix' to 'regex' conversion
process.
2019-04-14 13:01:31 +02:00
Bram Matthys a852b480d5 Add support for Argon2 password hashes (argon2id).
Also, make this the default for './unrealircd mkpasswd'.
The Windows version also works.. I just need to create a new library
package, will be done later today or tomorrow.
https://bugs.unrealircd.org/view.php?id=5116
2018-12-09 17:22:12 +01:00
Bram Matthys 6acfa3404b UnrealIRCd version updates 2018-09-28 09:26:40 +02:00
Bram Matthys ea651384f8 Add groundwork for draft/sts (more to follow)
Module coders:
* The cap->visible(void) callback function is now cap->visible(aClient *)
* There is a new cap->parameter(aClient *) callback function.
* Various updates to subfunctions to pass 'sptr' (due to the above),
  including clicap_find(sptr, ...)
* New CLICAP_FLAGS_UNREQABLE flag
Other:
* There is a new (src/)modules/cap directory containing the sts module,
  well.. once I commit it :D
2017-08-09 13:21:36 +02:00
Bram Matthys 50801f5068 Add conf/modules.optional.conf. This loads all additional modules that
are not in modules.default.conf.
2017-05-13 12:24:55 +02:00
Bram Matthys 9252ce30e9 Fix *NIX build (non Mac OS) by backing out all changes of past week. 2017-03-06 09:12:22 +01:00
Travis McArthur 12aa3289b9 Update Makefile to remove dep on private libs 2017-02-25 16:16:58 -08:00
Bram Matthys bae1dcf147 For increased security UnrealIRCd is now compiled with several hardening
options by default. This enables full RELRO (GOT and PLT being read-only),
stack protection and address space layout randomization (by enabling PIE,
the actual ASLR is left up to kernel).

Will cleanup some silly stuff later.. and have a go at the libs stuff..
2016-10-20 19:16:18 +02:00
Bram Matthys fd35f965a2 Use dynamic linking for our shipped private libraries (c-ares, tre, pcre2). Work in progress, may revert. 2016-10-20 19:02:55 +02:00
Bram Matthys 74ea7af9b7 Upgrade c-ares library to 1.12.0. Add CPPFLAGS support. 2016-09-30 15:23:34 +02:00
Bram Matthys ea3ac462d1 Don't overwrite spamfilter.conf, badwords.conf and dccallow.conf during
'make install'. Reported by ivanp (#4755).
2016-09-30 13:41:44 +02:00
Bram Matthys d41d7bdc46 Suggest cron job in 'make install' 2015-12-28 15:11:51 +01:00
Bram Matthys 7f07c3f71b Bump version to 4.0.0-rc5 2015-12-09 20:02:30 +01:00
Bram Matthys 507d88cf09 Bump version to 4.0.0-rc1 2015-10-10 17:44:52 +02:00
Bram Matthys d9756b8254 strange. 2015-07-14 12:40:29 +02:00
Bram Matthys 79c71ea490 'make install' did not install all 3rd party modules. 2015-07-14 12:37:30 +02:00
Bram Matthys 68ba94c136 Make './unreal backtrace' work again. Hmmm. 2015-07-12 18:07:10 +02:00
Bram Matthys bd21ea902c Add (src/)modules/third directory for 3rd party modules. Automatically build any .c files in there. 2015-07-05 20:04:09 +02:00