summaryrefslogtreecommitdiff
path: root/server.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Update copyrights, authorsJune McEnroe2022-07-171-1/+1
|
* Refactor XDG base directory iterator APIC. McEnroe2021-10-051-10/+10
| | | | Finally something more reasonable for call sites.
* Log IRC to standard output with -vC. McEnroe2021-10-021-2/+2
| | | | | So that it can actually be logged to a file separate from any errors or status messages. Also make sure only LF is used when logging.
* Be nice and call tls_close(3) on the serverC. McEnroe2021-09-021-0/+5
|
* Replace verbose colors with two types of arrowsC. McEnroe2021-08-201-2/+2
| | | | | | While the colors were easy to identify in blocks, the meaning of arrows is easier to remember, and survive logs being pasted for debugging.
* Explicitly clear TLS secrets after handshakeC. McEnroe2021-08-201-2/+3
| | | | Ported from catgirl ae64d277b8204c156a30d2e8b6a958e5a31f2a7f.
* Handle TLS_WANT_POLL{IN,OUT} from tls_handshake(3) with serverC. McEnroe2021-08-201-1/+3
|
* Use "secure" libtls ciphersC. McEnroe2021-08-201-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ported from catgirl: commit 585039fb6e5097cfd16bc083c6d1c9356b237882 Author: Klemens Nanni <klemens@posteo.de> Date: Sun Jun 20 14:42:10 2021 +0000 Use "secure" libtls ciphers d3e90b6 'Use libtls "compat" ciphers' from 2018 fell back to "compat" ciphers to support irc.mozilla.org which now yields NXDOMAIN. All modern networks (should) support secure ciphers, so drop the hopefully unneeded list of less secure ciphers by avoiding tls_config_set_ciphers(3) and therefore sticking to the "secure" aka. "default" set of ciphers in libtls. A quick check shows that almost all of the big/known IRC networks support TLS1.3 already; those who do not at least comply with SSL_CTX_set_cipher_list(3)'s "HIGH" set as can be tested like this: echo \ irc.hackint.org \ irc.tilde.chat \ irc.libera.chat \ irc.efnet.nl \ irc.oftc.net | xargs -tn1 \ openssl s_client -quiet -cipher HIGH -no_ign_eof -port 6697 -host
* Add -o and -t options to trust self-signed certificatesC. McEnroe2021-01-111-1/+19
|
* Use configPath to load client cert/privC. McEnroe2020-08-241-6/+17
|
* Say "OpenSSL" in additional permission noticesC. McEnroe2020-08-061-2/+2
| | | | LibreSSL is "a modified version of that library".
* Add additional permission for linking with LibreSSLC. McEnroe2020-06-081-0/+11
| | | | https://www.gnu.org/licenses/gpl-faq.en.html#GPLIncompatibleLibs
* Don't bother setting SO_NOSIGPIPEC. McEnroe2020-05-181-4/+0
| | | | We need to ignore SIGPIPE anyway for other platforms.
* Add server send queueing with time intervalC. McEnroe2020-05-111-0/+40
| | | | | | | | | This addresses pounce getting killed with "Excess flood" when it sends NAMES commands for too many channels when a client connects. These commands, as well as automatic AWAY commands, are by default throttled to 5 per second. Tested on freenode with 36 channels and 200ms interval.
* Tweak buffer sizesC. McEnroe2020-02-261-1/+1
| | | | | | Filter functions are dealing with lines not including CRLF, so they already have extra space. serverFormat is using snprintf which wants to always write a NUL at the end of the string.
* Support message-tagsC. McEnroe2020-02-251-1/+1
|
* Respond to tagged PINGs correctlyC. McEnroe2020-02-251-2/+7
| | | | Yikes.
* Bump buffer sizes to allow for tagsC. McEnroe2020-02-251-1/+1
| | | | | I still think this limit is unreasonably large in comparison to 512 for the actual message.
* Implement source address selectionmultiplexd2020-02-181-5/+30
| | | | | | This commit introduces a '-S' command line option and a "bind" configuration file option for selecting the source address when making outbound TCP connections (similar to the corresponding option in catgirl(1)).
* Exit on zero-length server readC. McEnroe2019-12-221-0/+1
|
* Change license to GPLv3C. McEnroe2019-11-061-4/+4
| | | | | | | | | | | | | | > Notwithstanding any other provision of this License, if you modify the > Program, your modified version must prominently offer all users > interacting with it remotely through a computer network (if your version > supports such interaction) an opportunity to receive the Corresponding > Source of your version by providing access to the Corresponding Source > from a network server at no charge, through some standard or customary > means of facilitating copying of software. This potentially means that every freenode user, for example, is interacting with this software, and offering the corresponding source to each of them is an unreasonable burden.
* Use explicit_bzero from LibreSSLC. McEnroe2019-11-061-2/+2
|
* Use one call to set client cert and keyC. McEnroe2019-11-051-13/+2
|
* Add options for TLS client certificateC. McEnroe2019-11-041-6/+33
|
* Use capsicumCurtis McEnroe2019-11-011-0/+3
|
* Use explicit_bzero to clear passwordsCurtis McEnroe2019-10-311-2/+2
| | | | | GNU doesn't implement memset_s, but both FreeBSD and GNU implement explicit_bzero. Darwin doesn't, so #define it in terms of memset_s.
* Move entire login flow to state and reorganize itCurtis McEnroe2019-10-281-60/+0
|
* Wait for SASL success before sending CAP ENDCurtis McEnroe2019-10-271-1/+1
| | | | | | | Also refuse to continue logging in if SASL authentication fails. I should really just move all of log in and authentication from server.c to state.c...
* Improve client/server error messagesCurtis McEnroe2019-10-271-2/+2
|
* Wait for AUTHENTICATE + from serverCurtis McEnroe2019-10-261-6/+1
|
* Respond to PING with same parameterCurtis McEnroe2019-10-261-1/+1
|
* Add undocumented flag to disable verificationCurtis McEnroe2019-10-261-1/+6
|
* Clean up server codeCurtis McEnroe2019-10-251-18/+15
|
* Use produce/consume words for ring bufferCurtis McEnroe2019-10-251-1/+1
| | | | To disambiguate clientRecv and clientRead, say clientConsume.
* Implement ringWriteCurtis McEnroe2019-10-241-1/+1
|
* Make serverFormat publicCurtis McEnroe2019-10-241-10/+8
|
* Respond to pingsCurtis McEnroe2019-10-231-2/+10
|
* Add verbose flagCurtis McEnroe2019-10-231-4/+8
|
* Set NOSIGPIPE on server connectionCurtis McEnroe2019-10-231-0/+4
|
* Actually send the buffer...Curtis McEnroe2019-10-231-1/+1
|
* Add stateCurtis McEnroe2019-10-231-0/+32
|
* Implement serverLoginCurtis McEnroe2019-10-221-0/+79
|
* Implement serverConnectCurtis McEnroe2019-10-221-0/+71