Commit Graph

133 Commits

Author SHA1 Message Date
Simon Ser
06fd7a460a doc/man: add note that memory message store is basic 2023-11-28 00:26:21 +01:00
Simon Ser
67f7d9aa3f Add support for draft/no-implicit-names
Same as the soju extension.
2023-11-27 13:49:40 +01:00
Simon Ser
d85424fe01 doc: add openssl command to fetch server fingerprint
This is not very pretty, but oh well.
2023-10-24 16:53:56 +02:00
Simon Ser
2e131cda6d doc: remove mention of dropped multi-upstream mode 2023-08-17 18:27:46 +02:00
Simon Ser
c06d97ab9b doc: clarify that client suffixes are not required for chathistory 2023-08-17 18:25:07 +02:00
Simon Ser
1a1610c1ce doc: expand on message store specificities 2023-08-17 18:13:11 +02:00
Simon Ser
fc1151326c service: add a way to reset a network certfp 2023-08-09 18:04:30 +02:00
Simon Ser
97cfb366b0 Replace soju.im/pre-away with draft/pre-away
The IRCv3 draft spec ended up being merged!
2023-08-03 20:14:46 +02:00
Simon Ser
c36bb342fb Introduce soju.im/pre-away
The IRCv3 spec is stalled, so let's just ship a vendored extension
for now.

References: https://github.com/ircv3/ircv3-specifications/pull/514
2023-08-03 19:38:31 +02:00
Simon Ser
f6421c3498 doc/packaging: add section about binding to privileged ports 2023-04-14 17:35:51 +02:00
Simon Ser
f2b6d0864b doc/packaging: clarify and expand 2023-03-22 16:25:15 +01:00
Simon Ser
c183d938ff doc: add man page for sojuctl 2023-03-15 18:34:50 +01:00
Simon Ser
4c8e955946 Move DefaultUnixAdminPath to config package
We can drop the soju package import. This shrinks down sojuctl's
size significantly (18M to 3M).
2023-03-15 17:47:47 +01:00
Simon Ser
8bbc2265be doc/packaging: new page 2023-02-22 21:25:10 +01:00
delthas
1ccc7ce6d2 Add a database store for messages
This adds a new config option, `logs db`, which enables storing chat
logs in the soju database.

Regular store options, CHATHISTORY options, and SEARCH operations are
supported, like the fs logs backend.

Messages are stored in a new table, Message. In order to track the list
of targets we have messages for in an optimized manner, another database
is used: MessageTarget.

All new requests are backend by indexes so should be fast even with
hundreds of thousands of messages.

A contrib script is provided for migrating existing logs fs chat logs to
the database. It can be run with eg:

  go run ./contrib/migrate-logs/ logs/ sqlite3:soju.db

Co-authored-by: Simon Ser <contact@emersion.fr>
2023-02-17 14:13:43 +01:00
delthas
2713bcba34 Add administrative unix listen endpoint
This adds support for listening on a Unix socket for administrative
connections, that then use a simple protocol for communicating with
the service (BouncerServ) as an administrator with a global context.

The wire format used by the Unix socket is IRC, but without
registration or overheads.

Example session:

    >>> BOUNCERSERV
    <<< 461 * BOUNCERSERV :Not enough parameters
    >>> BOUNCERSERV :n s
    <<< :gensou FAIL BOUNCERSERV :this command must be run as a user
    >>> BOUNCERSERV :u s
    <<< :gensou PRIVMSG * :marisa: 2 networks
    <<< :gensou PRIVMSG * :alice: 1 networks
    <<< :gensou BOUNCERSERV OK
2023-02-06 15:15:09 +01:00
delthas
ab235f0099 sojuctl: rename to sojudb
sojuctl will be used to control the soju deamon directly.

sojudb is a better name because it operates on the database file only.
2023-02-06 15:15:09 +01:00
Simon Ser
24cae474db Add support for PAM authentication 2023-01-30 11:55:43 +01:00
Simon Ser
ca2d666056 Auto-create users after external auth when enable-user-on-auth is on 2023-01-30 11:53:01 +01:00
Simon Ser
22a88079c2 Add support for external OAuth 2.0 authentication 2023-01-30 11:53:01 +01:00
Simon Ser
63ca247354 Add infrastructure for external authentication 2023-01-30 11:53:01 +01:00
Simon Ser
979fb319fe service: add -disable-password
This can be used to disable password authentication for a user.
This is useful to prevent a disabled user account from being
auto-enabled when enable-user-on-auth is on.
2023-01-26 20:03:37 +01:00
Simon Ser
db49bc120f Add enable-user-on-auth config directive 2023-01-26 19:51:35 +01:00
Simon Ser
9df9880301 Add disable-inactive-user config option
This can be used to automatically disable users if they don't
actively use the bouncer for a while.
2023-01-26 19:42:29 +01:00
Simon Ser
d7d9d45b45 Add a flag to disable users
Add a new flag to disable users. This can be useful to temporarily
deactivate an account without erasing data.

The user goroutine is kept alive for simplicity's sake. Most of the
infrastructure assumes that each user always has a running goroutine.
A disabled user's goroutine is responsible for sending back an error
to downstream connections, and listening for potential events to
re-enable the account.
2023-01-26 18:33:55 +01:00
delthas
959baa964f service: add user status
This lists all the users of the instances, along with the number
of networks they have.

Limited to 50 users to avoid flooding with thousands of messages
on large instances.
2023-01-18 16:24:12 +01:00
Simon Ser
bdb470484f doc: add "user run" to man page 2023-01-18 16:04:54 +01:00
Simon Ser
6734c5f8f0 doc: document command parsing rules for the service 2023-01-09 18:31:19 +01:00
rj1
be185fba33 Implement TLS fingerprint pinning
Closes: https://todo.sr.ht/~emersion/soju/56
2022-12-16 17:44:14 +01:00
Simon Ser
0edf3a40c2 service: add channel delete command 2022-12-08 16:00:00 +01:00
Sandra Snan
87b2d32682 Be more clear that -connect-command needs quotes 2022-11-28 15:10:39 +01:00
zsrv
926dcb37ac Make the auto-away functionality configurable 2022-09-26 19:52:07 +02:00
Simon Ser
dde4ee9518 config: drop multi-upstream-mode 2022-09-26 16:57:05 +02:00
Simon Ser
085f5c17a4 doc: drop multi-upstream mode bits 2022-09-26 16:57:05 +02:00
gildarts
0777ca0d29 Add ability for a user to delete themselves
Adds user self delete
Adds confirmation of user deletion
2022-07-12 18:14:11 +02:00
Simon Ser
dc0a847240 Add per-user default nickname
The soju username is immutable. Add a separate nickname setting so
that users can change their nickname for all networks.

References: https://todo.sr.ht/~emersion/soju/110
2022-07-08 18:01:05 +02:00
Simon Ser
5ef7e07061 contrib/znc-import: move to subdir
Go isn't happy when multiple scripts share the same directory.
2022-07-04 15:52:09 +02:00
Simon Ser
71d639699e Add support for draft/read-marker
References: https://github.com/ircv3/ircv3-specifications/pull/489
2022-07-01 13:33:28 +02:00
gildarts
4bc9aaf659 Add detach option to channel update
Add `-detached` to `channel update` command

Co-authored-by: Simon Ser <contact@emersion.fr>
Closes: https://todo.sr.ht/~emersion/soju/140
2022-06-24 22:04:12 +02:00
Simon Ser
3863b8cb6b Add webpush extension
References: https://github.com/ircv3/ircv3-specifications/pull/471
Co-authored-by: delthas <delthas@dille.cc>
2022-06-14 16:16:12 +02:00
Simon Ser
22b235602b Add soju.im/account-required
References: https://github.com/ircv3/ircv3-specifications/pull/492
2022-06-04 10:52:28 +02:00
Simon Ser
e2e232fa9c config: add message-store memory
The old way to do this was `message-store fs ""`, which is
misleading.
2022-05-09 16:59:27 +02:00
Simon Ser
80ed0d2a6c Rename "log" config directive to "message-store"
This is more explicit and removes the ambiguity with error logging.
2022-05-09 16:41:41 +02:00
Brett Cornwall
9d188a7cb6 doc/getting-started: Fix simple misspelling. 2022-05-05 18:53:15 +02:00
Simon Ser
23f94a5c6e doc/ext/bouncer-networks: remove BOUNCER BIND auth restriction
We now stash the network ID until connection registration completes.
2022-05-03 09:32:21 +02:00
Simon Ser
48ec515120 doc/ext/bouncer-networks: specify how attributes are cleared in notifications
We send an "error" attribute without a value to clear it, for instance.
2022-05-01 19:37:36 +02:00
delthas
683cfe0615 Add support for the SEARCH extension 2022-04-12 17:58:16 +02:00
delthas
f7a468194d bouncer-networks: Add a read-only error attribute
This is useful for clients to display additional info abotu why a
network is disconnected.
2022-04-11 08:38:31 +02:00
Simon Ser
17374f2094 doc/getting-started: ask to install soju
This might seem obvious but… let's add a short sentence just in
case.
2022-04-06 15:58:16 +02:00
Simon Ser
3d8022d030 doc/getting-started: mention TLS and on-disk logs 2022-03-26 18:42:34 +01:00