mirror of
https://github.com/osmarks/ngircd.git
synced 2025-11-11 03:03:02 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
164da7d063 | ||
|
|
acf8409c60 | ||
|
|
02a572d829 |
63
.github/workflows/ci.yml
vendored
63
.github/workflows/ci.yml
vendored
@@ -28,32 +28,53 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_distcheck:
|
build_and_distcheck:
|
||||||
|
name: build+test
|
||||||
name: Configure ngIRCd sources and run make targets "all" and "distcheck"
|
strategy:
|
||||||
runs-on: ubuntu-latest
|
matrix:
|
||||||
timeout-minutes: 10
|
os:
|
||||||
|
- ubuntu
|
||||||
|
- macos
|
||||||
|
toolchain:
|
||||||
|
- gcc
|
||||||
|
- llvm
|
||||||
|
include:
|
||||||
|
- os: ubuntu
|
||||||
|
toolchain: gcc
|
||||||
|
install_cmd: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install build-essential expect libident-dev libpam0g-dev libssl-dev libwrap0-dev pkg-config telnet zlib1g-dev gcc
|
||||||
|
configure_cmd: |
|
||||||
|
./configure CC=gcc --enable-ipv6 --with-iconv --with-ident --with-openssl --with-pam --with-tcp-wrappers --with-zlib
|
||||||
|
- os: ubuntu
|
||||||
|
toolchain: llvm
|
||||||
|
install_cmd: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install build-essential expect libident-dev libpam0g-dev libssl-dev libwrap0-dev pkg-config telnet zlib1g-dev clang
|
||||||
|
configure_cmd: |
|
||||||
|
./configure CC=clang --enable-ipv6 --with-iconv --with-ident --with-openssl --with-pam --with-tcp-wrappers --with-zlib
|
||||||
|
- os: macos
|
||||||
|
toolchain: gcc
|
||||||
|
install_cmd: |
|
||||||
|
brew update
|
||||||
|
brew install autoconf automake expect openssl@3 pkg-config telnet zlib gcc
|
||||||
|
configure_cmd: |
|
||||||
|
./configure CC=gcc --enable-ipv6 --with-iconv --with-openssl --with-zlib
|
||||||
|
- os: macos
|
||||||
|
toolchain: llvm
|
||||||
|
install_cmd: |
|
||||||
|
brew update
|
||||||
|
brew install autoconf automake expect openssl@3 pkg-config telnet zlib llvm
|
||||||
|
configure_cmd: |
|
||||||
|
./configure CC=clang --enable-ipv6 --with-iconv --with-openssl --with-zlib
|
||||||
|
runs-on: ${{ matrix.os }}-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: awalsh128/cache-apt-pkgs-action@v1
|
- name: Install dependencies
|
||||||
with:
|
run: ${{ matrix.install_cmd }}
|
||||||
packages: >
|
|
||||||
autoconf
|
|
||||||
automake
|
|
||||||
build-essential
|
|
||||||
expect
|
|
||||||
libident-dev
|
|
||||||
libpam0g-dev
|
|
||||||
libssl-dev
|
|
||||||
libwrap0-dev
|
|
||||||
pkg-config
|
|
||||||
telnet
|
|
||||||
zlib1g-dev
|
|
||||||
version: 1.0
|
|
||||||
- name: Generate build system files
|
- name: Generate build system files
|
||||||
run: ./autogen.sh
|
run: ./autogen.sh
|
||||||
- name: Configure the build system
|
- name: Configure the build system
|
||||||
run: ./configure --enable-ipv6 --with-iconv --with-ident --with-openssl --with-pam --with-tcp-wrappers --with-zlib
|
run: ${{ matrix.configure_cmd }}
|
||||||
- name: Build everything
|
- name: Build everything
|
||||||
run: make all
|
run: make all
|
||||||
- name: Create distribution archive and run tests
|
- name: Create distribution archive and run tests
|
||||||
|
|||||||
11
doc/SSL.md
11
doc/SSL.md
@@ -26,7 +26,7 @@ SSL-encrypted connections and plain-text connects can't run on the same network
|
|||||||
port (which is a limitation of the IRC protocol); therefore you have to define
|
port (which is a limitation of the IRC protocol); therefore you have to define
|
||||||
separate port(s) in your `[SSL]` block in the configuration file.
|
separate port(s) in your `[SSL]` block in the configuration file.
|
||||||
|
|
||||||
A minimal configuration for *accepting* SSL-encrypted client & server
|
A minimal configuration for *accepting* SSL-encrypted client
|
||||||
connections looks like this:
|
connections looks like this:
|
||||||
|
|
||||||
``` ini
|
``` ini
|
||||||
@@ -36,11 +36,12 @@ KeyFile = /etc/ssl/certs/my-privkey.pem
|
|||||||
Ports = 6697, 6698
|
Ports = 6697, 6698
|
||||||
```
|
```
|
||||||
|
|
||||||
In this case, the server only deals with *incoming* connections and never has to
|
In this case, the server only deals with unauthenticated incoming
|
||||||
validate SSL certificates itself, and therefore no "Certificate Authorities" are
|
connections and never has to validate SSL certificates itself, and therefore
|
||||||
needed.
|
no "Certificate Authorities" are needed.
|
||||||
|
|
||||||
If you want to use *outgoing* SSL-connections to other servers, you need to add:
|
If you want to use *outgoing* SSL-connections to other servers or accept
|
||||||
|
incoming *server* connections, you need to add:
|
||||||
|
|
||||||
``` ini
|
``` ini
|
||||||
[SSL]
|
[SSL]
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ IRC_MODE( CLIENT *Client, REQUEST *Req )
|
|||||||
{
|
{
|
||||||
CLIENT *cl, *origin;
|
CLIENT *cl, *origin;
|
||||||
CHANNEL *chan;
|
CHANNEL *chan;
|
||||||
|
bool is_valid_nick, is_valid_chan;
|
||||||
|
|
||||||
assert(Client != NULL);
|
assert(Client != NULL);
|
||||||
assert(Req != NULL);
|
assert(Req != NULL);
|
||||||
@@ -76,10 +77,12 @@ IRC_MODE( CLIENT *Client, REQUEST *Req )
|
|||||||
Client = Client_Search(Req->prefix);
|
Client = Client_Search(Req->prefix);
|
||||||
|
|
||||||
/* Channel or user mode? */
|
/* Channel or user mode? */
|
||||||
|
is_valid_nick = Client_IsValidNick(Req->argv[0]);
|
||||||
|
is_valid_chan = Channel_IsValidName(Req->argv[0]);
|
||||||
cl = NULL; chan = NULL;
|
cl = NULL; chan = NULL;
|
||||||
if (Client_IsValidNick(Req->argv[0]))
|
if (is_valid_nick)
|
||||||
cl = Client_Search(Req->argv[0]);
|
cl = Client_Search(Req->argv[0]);
|
||||||
if (Channel_IsValidName(Req->argv[0]))
|
if (is_valid_chan)
|
||||||
chan = Channel_Search(Req->argv[0]);
|
chan = Channel_Search(Req->argv[0]);
|
||||||
|
|
||||||
if (cl)
|
if (cl)
|
||||||
@@ -88,8 +91,12 @@ IRC_MODE( CLIENT *Client, REQUEST *Req )
|
|||||||
return Channel_Mode(Client, Req, origin, chan);
|
return Channel_Mode(Client, Req, origin, chan);
|
||||||
|
|
||||||
/* No target found! */
|
/* No target found! */
|
||||||
return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG,
|
if (is_valid_nick)
|
||||||
Client_ID(Client), Req->argv[0]);
|
return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG,
|
||||||
|
Client_ID(Client), Req->argv[0]);
|
||||||
|
else
|
||||||
|
return IRC_WriteErrClient(Client, ERR_NOSUCHCHANNEL_MSG,
|
||||||
|
Client_ID(Client), Req->argv[0]);
|
||||||
} /* IRC_MODE */
|
} /* IRC_MODE */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user