source: code/trunk/doc/soju.1.scd@ 522

Last change on this file since 522 was 507, checked in by contact, 4 years ago

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.

File size: 8.4 KB
Line 
1soju(1)
2
3# NAME
4
5soju - IRC bouncer
6
7# SYNOPSIS
8
9*soju* [options...]
10
11# DESCRIPTION
12
13soju is a user-friendly IRC bouncer. It connects to upstream IRC servers on
14behalf of the user to provide extra features.
15
16- Multiple separate users sharing the same bouncer, each with their own
17 upstream servers
18- Clients connecting to multiple upstream servers via a single connection to
19 the bouncer
20- Sending the backlog (messages received while the user was disconnected from
21 the bouncer), with per-client buffers
22
23When joining a channel, the channel will be saved and automatically joined on
24the next connection. When registering or authenticating with NickServ, the
25credentials will be saved and automatically used on the next connection if the
26server supports SASL. When parting a channel with the reason "detach", the
27channel will be detached instead of being left.
28
29When all clients are disconnected from the bouncer, the user is automatically
30marked as away.
31
32soju supports two connection modes:
33
34- Single upstream mode: one downstream connection maps to one upstream
35 connection. To enable this mode, connect to the bouncer with the username
36 "<username>/<network>". If the bouncer isn't connected to the upstream
37 server, it will get automatically added. Then channels can be joined and
38 parted as if you were directly connected to the upstream server.
39- Multiple upstream mode: one downstream connection maps to multiple upstream
40 connections. Channels and nicks are suffixed with the network name. To join
41 a channel, you need to use the suffix too: _/join #channel/network_. Same
42 applies to messages sent to users.
43
44For per-client history to work, clients need to indicate their name. This can
45be done by adding a "@<client>" suffix to the username.
46
47soju will reload the TLS certificate and key when it receives the HUP signal.
48
49# OPTIONS
50
51*-h, -help*
52 Show help message and quit.
53
54*-config* <path>
55 Path to the config file. If unset, a default config file is used.
56
57*-debug*
58 Enable debug logging (this will leak sensitive information such as
59 passwords).
60
61*-listen* <uri>
62 Listening URI (default: ":6697"). Can be specified multiple times.
63
64# CONFIG FILE
65
66The config file has one directive per line.
67
68Example:
69
70```
71listen ircs://
72tls cert.pem key.pem
73hostname example.org
74```
75
76The following directives are supported:
77
78*listen* <uri>
79 Listening URI (default: ":6697").
80
81 The following URIs are supported:
82
83 - _[ircs://][host][:port]_ listens with TLS over TCP (default port if
84 omitted: 6697)
85 - _irc+insecure://[host][:port]_ listens with plain-text over TCP (default
86 port if omitted: 6667)
87 - _unix:///<path>_ listens on a Unix domain socket
88 - _wss://[host][:port]_ listens for WebSocket connections over TLS (default
89 port: 443)
90 - _ws+insecure://[host][:port]_ listens for plain-text WebSocket
91 connections (default port: 80)
92 - _ident://[host][:port]_ listens for plain-text ident connections (default
93 port: 113)
94
95 If the scheme is omitted, "ircs" is assumed. If multiple *listen*
96 directives are specified, soju will listen on each of them.
97
98*hostname* <name>
99 Server hostname (default: system hostname).
100
101*tls* <cert> <key>
102 Enable TLS support. The certificate and the key files must be PEM-encoded.
103
104*db* sqlite3 <path>
105 Set the SQLite database path (default: "soju.db" in the current directory).
106
107*log* fs <path>
108 Path to the bouncer logs root directory, or empty to disable logging. By
109 default, logging is disabled.
110
111*http-origin* <patterns...>
112 List of allowed HTTP origins for WebSocket listeners. The parameters are
113 interpreted as shell patterns, see *glob*(7).
114
115*accept-proxy-ip* <cidr...>
116 Allow the specified IPs to act as a proxy. Proxys have the ability to
117 overwrite the remote and local connection addresses (via the X-Forwarded-\*
118 HTTP header fields). The special name "localhost" accepts the loopback
119 addresses 127.0.0.0/8 and ::1/128. By default, all IPs are rejected.
120
121# IRC SERVICE
122
123soju exposes an IRC service called *BouncerServ* to manage the bouncer.
124Commands can be sent via regular private messages
125(_/msg BouncerServ <command> [args...]_). Commands may be written in full or
126abbreviated form, for instance *network* can be abbreviated as *net* or just
127*n*.
128
129*help* [command]
130 Show a list of commands. If _command_ is specified, show a help message for
131 the command.
132
133*network create* *-addr* <addr> [options...]
134 Connect to a new network at _addr_. _-addr_ is mandatory.
135
136 _addr_ supports several connection types:
137
138 - _[ircs://]<host>[:port]_ connects with TLS over TCP
139 - _irc+insecure://<host>[:port]_ connects with plain-text TCP
140 - _irc+unix:///<path>_ connects to a Unix socket
141
142 Other options are:
143
144 *-name* <name>
145 Short network name. This will be used instead of _addr_ to refer to the
146 network.
147
148 *-username* <username>
149 Connect with the specified username. By default, the nickname is used.
150
151 *-pass* <pass>
152 Connect with the specified server password.
153
154 *-realname* <realname>
155 Connect with the specified real name. By default, the nickname is used.
156
157 *-nick* <nickname>
158 Connect with the specified nickname. By default, the account's username
159 is used.
160
161*network update* <name> [options...]
162 Update an existing network. The options are the same as the
163 _network create_ command.
164
165 When this command is executed, soju will disconnect and re-connect to the
166 network.
167
168*network delete* <name>
169 Disconnect and delete a network.
170
171*network status*
172 Show a list of saved networks and their current status.
173
174*channel update* <name> [options...]
175 Update the options of an existing channel.
176
177 Options are:
178
179 *-relay-detached* <mode>
180 Set when to relay messages from detached channels to the user with a BouncerServ NOTICE.
181
182 Modes are:
183
184 *message*
185 Relay any message from this channel when detached.
186
187 *highlight*
188 Relay only messages mentioning you when detached.
189
190 *none*
191 Don't relay any messages from this channel when detached.
192
193 *default*
194 Currently same as *highlight*. This is the default behaviour.
195
196 *-reattach-on* <mode>
197 Set when to automatically reattach to detached channels.
198
199 Modes are:
200
201 *message*
202 Reattach to this channel when any message is received.
203
204 *highlight*
205 Reattach to this channel when any message mentioning you is received.
206
207 *none*
208 Never automatically reattach to this channel.
209
210 *default*
211 Currently same as *none*. This is the default behaviour.
212
213 *-detach-after* <duration>
214 Automatically detach this channel after the specified duration has elapsed without receving any message corresponding to *-detach-on*.
215
216 Example duration values: *1h30m*, *30s*, *2.5h*.
217
218 Setting this value to 0 will disable this behaviour, i.e. this channel will never be automatically detached. This is the default behaviour.
219
220 *-detach-on* <mode>
221 Set when to reset the auto-detach timer used by *-detach-after*, causing it to wait again for the auto-detach duration timer before detaching.
222 Joining, reattaching, sending a message, or changing any channel option will reset the timer, in addition to the messages specified by the mode.
223
224 Modes are:
225
226 *message*
227 Receiving any message from this channel will reset the auto-detach timer.
228
229 *highlight*
230 Receiving any message mentioning you from this channel will reset the auto-detach timer.
231
232 *none*
233 Receiving messages from this channel will not reset the auto-detach timer. Sending messages or joining the channel will still reset the timer.
234
235 *default*
236 Currently same as *message*. This is the default behaviour.
237
238*certfp generate* [options...] <network name>
239 Generate self-signed certificate and use it for authentication (via SASL
240 EXTERNAL).
241
242 Generates a RSA-3072 private key by default.
243
244 Options are:
245
246 *-key-type* <type>
247 Private key algoritm to use. Valid values are: rsa, ecdsa, ed25519.
248 ecdsa uses NIST P-521 curve.
249
250 *-bits* <bits>
251 Size of RSA key to generate. Ignored for other key types.
252
253*certfp fingerprint* <network name>
254 Show SHA-1 and SHA-256 fingerprints for the certificate
255 currently used with the network.
256
257*sasl set-plain* <network name> <username> <password>
258 Set SASL PLAIN credentials.
259
260*sasl reset* <network name>
261 Disable SASL authentication and remove stored credentials.
262
263*user create* -username <username> -password <password> [-admin]
264 Create a new soju user. Only admin users can create new accounts.
265
266*change-password* <new password>
267 Change current user password.
268
269# AUTHORS
270
271Maintained by Simon Ser <contact@emersion.fr>, who is assisted by other
272open-source contributors. For more information about soju development, see
273https://sr.ht/~emersion/soju.
Note: See TracBrowser for help on using the repository browser.