Commit graph

70 commits

Author SHA1 Message Date
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
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 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
Simon Ser 86f08ec35d doc/soju.1: fix syntax error 2022-03-21 16:11:11 +01:00
delthas 2ac9bd9c94 Require an explicit * network suffix for multi-upstream
Most users will connect to their server with `<username>` as their
username in order to configure their upstreams.

Multi-upstream can be unintuitive to them and should not be enabled on
that first connection that is usually used for upstream configuration.

Multi-upstream is instead a power-user feature that should be explicitly
enabled with a specific network suffix.

We reserve the network suffix `*` and use it a special case to mean that
it requests multi-upstream mode.
2022-03-21 09:56:20 +01:00
Simon Ser 5feae506d4 doc/soju.1: recommend using a FQDN for the hostname 2022-03-15 23:01:08 +01:00
Simon Ser 3f91cfb8c3 service: make name arg optional for network commands
Makes commands less verbose.
2022-02-07 21:33:16 +01:00
Simon Ser 57715d8ce2 service: switch to -network flag for certfp and sasl commands
Instead of always requiring users to explicitly specify the network
name, guess it from the downstream connection.

Network commands are left as-is because it's not yet clear how to
handle them.
2022-02-04 16:47:34 +01:00
Simon Ser 43c440e600 Add "sasl status" command 2021-12-01 11:03:27 +01:00
Simon Ser e42b507377 doc/soju.1: add network create example 2021-11-30 09:26:07 +01:00
Simon Ser d722f56000 Add pprof HTTP server
This enables production debugging of the bouncer.

Closes: https://todo.sr.ht/~emersion/soju/155
2021-11-17 16:18:52 +01:00
Simon Ser 8f8d7aab0e Add basic Prometheus metrics exporter
This only exports the default metrics for now.

References: https://todo.sr.ht/~emersion/soju/142
2021-11-17 15:58:18 +01:00
Simon Ser 55840312b4 Add per-user IP addresses
The new upstream-user-ip directive allows bouncer operators to
assign one IP address per user.
2021-11-17 15:07:58 +01:00
Simon Ser 3941f67380 Add config option to globally disable multi-upstream mode
Closes: https://todo.sr.ht/~emersion/soju/122
2021-11-17 11:41:11 +01:00
Simon Ser 73295e4fa7 Allow most config options to be reloaded
Closes: https://todo.sr.ht/~emersion/soju/42
2021-11-16 00:38:04 +01:00
Simon Ser 07c962018d Add title config option
Closes: https://todo.sr.ht/~emersion/soju/146
2021-11-02 22:38:07 +01:00
Simon Ser a9a066faac Add bouncer MOTD
Closes: https://todo.sr.ht/~emersion/soju/137
2021-10-13 10:58:34 +02:00
Simon Ser c8aba6286f doc.soju.1: fix typo and improve formatting for "certfp generate" 2021-10-12 21:34:25 +02:00
Simon Ser 8ef2de196d doc/soju.1: add descriptions for all flags for "user create" 2021-10-12 21:31:12 +02:00
Simon Ser 96f8751e3d doc/soju.1: use angle-brackets for URL
Helps a bit terminal emulators to recognize the link.
2021-10-12 21:27:48 +02:00
Simon Ser 4e9ddf78ab service: allow updating other users 2021-10-12 09:11:14 +02:00
Hubert Hirtz 6e06663615 PostgreSQL support 2021-10-11 15:21:04 +02:00
Simon Ser 5a2d6246ec Add "server notice" command 2021-10-08 10:52:03 +02:00
Simon Ser 94dbfff11d Add max-user-networks config option 2021-10-07 20:43:10 +02:00
Simon Ser 9f021ba9a9 doc/soju.1: mention that accept-proxy-ip affects PROXY proto 2021-10-07 20:04:20 +02:00
Simon Ser f93616fb41 Add "server status" command
Right now, it prints the number of active users and number of
downstream connections.
2021-10-05 19:13:53 +02:00
delthas 896caebfcf service: Introduce network quote
This command enables sending a raw line to a specific network.
2021-07-07 10:34:46 +02:00
Simon Ser 00538e7028 doc/soju.1: improve "user create" docs 2021-06-28 16:55:49 +02:00
Simon Ser 09b04792b9 Merge "change-password" into "user update"
Add a -password flag to the "user update" command.
2021-06-28 16:55:44 +02:00
Simon Ser a14f646135 Add per-user realname setting
This allows users to set a default realname used if the per-network
realname isn't set.

A new "user update" command is introduced and can be extended to edit
other user properties and other users in the future.
2021-06-25 20:33:13 +02:00
Simon Ser 089608409e doc/soju.1: document bouncer-wide broadcasts 2021-06-23 19:30:47 +02:00
Simon Ser 520ed76adf doc/soju.1: explain http-origin defaults 2021-06-11 10:26:22 +02:00
Simon Ser 7d648f702e Allow networks to be disabled 2021-05-26 10:51:02 +02:00
Simon Ser 1b43b05588 Add channel status service command 2021-05-25 19:22:22 +02:00
Simon Ser 697bdd32dd doc/soju.1: document user delete command 2021-05-22 10:44:36 +02:00
Simon Ser 95b9493310 doc/soju.1: document -connect-command 2021-05-22 10:40:36 +02:00
Simon Ser 706b6e33fb
Make db and log config options more future-proof
Rename the "sql" directive to "db". Rename the "log" directive to
"log fs".

In the future, we'll maybe support more databases and more message
stores. Make it so it's easy to integrate these new festures to the
config file format.
2021-04-21 18:15:04 +02:00
Simon Ser c375c7d922 cmd/soju: allow specifying -listen multiple times
Closes: https://todo.sr.ht/~emersion/soju/67
2021-03-31 19:02:40 +02:00
Simon Ser 21e9fe9b3c Reload TLS certs on SIGHUP
References: https://todo.sr.ht/~emersion/soju/42
2021-03-18 14:07:03 +01:00
Simon Ser 061347f9f9 Add Unix socket listener
Closes: https://todo.sr.ht/~emersion/soju/51
2021-03-16 09:27:40 +01:00
delthas 0ddc0de7e5 service: Introduce channel update
This adds the `channel update` service command, which is used to set the
auto-detach, auto-reattach, and message relaying settings of a channel.

Of note is that currently the parser parses `#` as a comment, which
means any `channel update #foo ...` will actually need to be escaped to
`channel update "#foo" ...`
2020-12-14 20:54:02 +01:00
Simon Ser 88d241fd1d
Don't accept any IP as a proxy by default
It's too easy to setup a reverse proxy which doesn't support the PROXY
protocol, or lets the X-Forwarded-For header fields pass through.
Disable this by default.

To restore the previous behaviour, add `accept-proxy-ip localhost` to
the config file.
2020-10-25 18:22:12 +01:00
Simon Ser 3d316fe01c
doc: add ident server to man page 2020-08-11 11:03:20 +02:00
Thorben Günther 0ff4ac07fe
doc: fix typo in man page 2020-07-23 23:31:37 +02:00
Simon Ser ef2dd479bf
Add accept-proxy-ip config directive
This allows to set the list of IPs allowed to act as a proxy. This is
only used for WebSockets right now, but will be expanded to TCP as well
once the PROXY protocol is supported.
2020-07-22 17:03:01 +02:00
Simon Ser b0bf012bbc
Change unix:// to irc+unix://
When Unix socket support will be added for listeners, unix:// will be
ambiguous. It won't be clear whether to setup an IRC server, or some
other kind of server (e.g. identd).

unix:// is still recognized to avoid breaking existing DBs.
2020-07-22 15:44:19 +02:00
Simon Ser d3661705dc
doc: add example config file in man page 2020-07-22 15:43:22 +02:00
Simon Ser c616a17041
doc: mention SASL EXTERNAL in the CertFP docs 2020-07-22 12:51:32 +02:00
Simon Ser cc01ffc19d
Rename certfp reset to sasl reset
And make it reset all SASL credentials.
2020-07-22 12:20:52 +02:00