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

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

Add channel status service command

File size: 9.1 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 *-connect-command* <command>
162 Send the specified command as a raw IRC message right after connecting
163 to the server. This can be used to identify to an account when the
164 server doesn't support SASL.
165
166 For instance, to identify with _NickServ_, the following command can be
167 used:
168
169 ```
170 PRIVMSG NickServ :IDENTIFY <password>
171 ```
172
173 The flag can be specified multiple times to send multiple IRC messages.
174 To clear all commands, set it to the empty string.
175
176*network update* <name> [options...]
177 Update an existing network. The options are the same as the
178 _network create_ command.
179
180 When this command is executed, soju will disconnect and re-connect to the
181 network.
182
183*network delete* <name>
184 Disconnect and delete a network.
185
186*network status*
187 Show a list of saved networks and their current status.
188
189*channel status* [options...]
190 Show a list of saved channels and their current status.
191
192 Options:
193
194 *-network* <name>
195 Only show channels for the specified network. By default, only the
196 channels in the current network are displayed.
197
198*channel update* <name> [options...]
199 Update the options of an existing channel.
200
201 Options are:
202
203 *-relay-detached* <mode>
204 Set when to relay messages from detached channels to the user with a BouncerServ NOTICE.
205
206 Modes are:
207
208 *message*
209 Relay any message from this channel when detached.
210
211 *highlight*
212 Relay only messages mentioning you when detached.
213
214 *none*
215 Don't relay any messages from this channel when detached.
216
217 *default*
218 Currently same as *highlight*. This is the default behaviour.
219
220 *-reattach-on* <mode>
221 Set when to automatically reattach to detached channels.
222
223 Modes are:
224
225 *message*
226 Reattach to this channel when any message is received.
227
228 *highlight*
229 Reattach to this channel when any message mentioning you is received.
230
231 *none*
232 Never automatically reattach to this channel.
233
234 *default*
235 Currently same as *none*. This is the default behaviour.
236
237 *-detach-after* <duration>
238 Automatically detach this channel after the specified duration has elapsed without receving any message corresponding to *-detach-on*.
239
240 Example duration values: *1h30m*, *30s*, *2.5h*.
241
242 Setting this value to 0 will disable this behaviour, i.e. this channel will never be automatically detached. This is the default behaviour.
243
244 *-detach-on* <mode>
245 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.
246 Joining, reattaching, sending a message, or changing any channel option will reset the timer, in addition to the messages specified by the mode.
247
248 Modes are:
249
250 *message*
251 Receiving any message from this channel will reset the auto-detach timer.
252
253 *highlight*
254 Receiving any message mentioning you from this channel will reset the auto-detach timer.
255
256 *none*
257 Receiving messages from this channel will not reset the auto-detach timer. Sending messages or joining the channel will still reset the timer.
258
259 *default*
260 Currently same as *message*. This is the default behaviour.
261
262*certfp generate* [options...] <network name>
263 Generate self-signed certificate and use it for authentication (via SASL
264 EXTERNAL).
265
266 Generates a RSA-3072 private key by default.
267
268 Options are:
269
270 *-key-type* <type>
271 Private key algoritm to use. Valid values are: rsa, ecdsa, ed25519.
272 ecdsa uses NIST P-521 curve.
273
274 *-bits* <bits>
275 Size of RSA key to generate. Ignored for other key types.
276
277*certfp fingerprint* <network name>
278 Show SHA-1 and SHA-256 fingerprints for the certificate
279 currently used with the network.
280
281*sasl set-plain* <network name> <username> <password>
282 Set SASL PLAIN credentials.
283
284*sasl reset* <network name>
285 Disable SASL authentication and remove stored credentials.
286
287*user create* -username <username> -password <password> [-admin]
288 Create a new soju user. Only admin users can create new accounts.
289
290*user delete* <username>
291 Delete a soju user. Only admins can delete accounts.
292
293*change-password* <new password>
294 Change current user password.
295
296# AUTHORS
297
298Maintained by Simon Ser <contact@emersion.fr>, who is assisted by other
299open-source contributors. For more information about soju development, see
300https://sr.ht/~emersion/soju.
Note: See TracBrowser for help on using the repository browser.