1 | soju(1)
|
---|
2 |
|
---|
3 | # NAME
|
---|
4 |
|
---|
5 | soju - IRC bouncer
|
---|
6 |
|
---|
7 | # SYNOPSIS
|
---|
8 |
|
---|
9 | *soju* [options...]
|
---|
10 |
|
---|
11 | # DESCRIPTION
|
---|
12 |
|
---|
13 | soju is a user-friendly IRC bouncer. It connects to upstream IRC servers on
|
---|
14 | behalf 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 |
|
---|
23 | When joining a channel, the channel will be saved and automatically joined on
|
---|
24 | the next connection. When registering or authenticating with NickServ, the
|
---|
25 | credentials will be saved and automatically used on the next connection if the
|
---|
26 | server supports SASL. When parting a channel with the reason "detach", the
|
---|
27 | channel will be detached instead of being left.
|
---|
28 |
|
---|
29 | When all clients are disconnected from the bouncer, the user is automatically
|
---|
30 | marked as away.
|
---|
31 |
|
---|
32 | soju 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 |
|
---|
44 | For per-client history to work, clients need to indicate their name. This can
|
---|
45 | be done by adding a "@<client>" suffix to the username.
|
---|
46 |
|
---|
47 | soju will reload the TLS certificate and key when it receives the HUP signal.
|
---|
48 |
|
---|
49 | Administrators can broadcast a message to all bouncer users via _/notice
|
---|
50 | $<hostname> <text>_, or via _/notice $\* <text>_ in multi-upstream mode. All
|
---|
51 | currently connected bouncer users will receive the message from the special
|
---|
52 | _BouncerServ_ service.
|
---|
53 |
|
---|
54 | # OPTIONS
|
---|
55 |
|
---|
56 | *-h, -help*
|
---|
57 | Show help message and quit.
|
---|
58 |
|
---|
59 | *-config* <path>
|
---|
60 | Path to the config file. If unset, a default config file is used.
|
---|
61 |
|
---|
62 | *-debug*
|
---|
63 | Enable debug logging (this will leak sensitive information such as
|
---|
64 | passwords).
|
---|
65 |
|
---|
66 | *-listen* <uri>
|
---|
67 | Listening URI (default: ":6697"). Can be specified multiple times.
|
---|
68 |
|
---|
69 | # CONFIG FILE
|
---|
70 |
|
---|
71 | The config file has one directive per line.
|
---|
72 |
|
---|
73 | Example:
|
---|
74 |
|
---|
75 | ```
|
---|
76 | listen ircs://
|
---|
77 | tls cert.pem key.pem
|
---|
78 | hostname example.org
|
---|
79 | ```
|
---|
80 |
|
---|
81 | The following directives are supported:
|
---|
82 |
|
---|
83 | *listen* <uri>
|
---|
84 | Listening URI (default: ":6697").
|
---|
85 |
|
---|
86 | The following URIs are supported:
|
---|
87 |
|
---|
88 | - _[ircs://][host][:port]_ listens with TLS over TCP (default port if
|
---|
89 | omitted: 6697)
|
---|
90 | - _irc+insecure://[host][:port]_ listens with plain-text over TCP (default
|
---|
91 | port if omitted: 6667)
|
---|
92 | - _unix:///<path>_ listens on a Unix domain socket
|
---|
93 | - _wss://[host][:port]_ listens for WebSocket connections over TLS (default
|
---|
94 | port: 443)
|
---|
95 | - _ws+insecure://[host][:port]_ listens for plain-text WebSocket
|
---|
96 | connections (default port: 80)
|
---|
97 | - _ident://[host][:port]_ listens for plain-text ident connections (default
|
---|
98 | port: 113)
|
---|
99 |
|
---|
100 | If the scheme is omitted, "ircs" is assumed. If multiple *listen*
|
---|
101 | directives are specified, soju will listen on each of them.
|
---|
102 |
|
---|
103 | *hostname* <name>
|
---|
104 | Server hostname (default: system hostname).
|
---|
105 |
|
---|
106 | *tls* <cert> <key>
|
---|
107 | Enable TLS support. The certificate and the key files must be PEM-encoded.
|
---|
108 |
|
---|
109 | *db* sqlite3 <path>
|
---|
110 | Set the SQLite database path (default: "soju.db" in the current directory).
|
---|
111 |
|
---|
112 | *log* fs <path>
|
---|
113 | Path to the bouncer logs root directory, or empty to disable logging. By
|
---|
114 | default, logging is disabled.
|
---|
115 |
|
---|
116 | *http-origin* <patterns...>
|
---|
117 | List of allowed HTTP origins for WebSocket listeners. The parameters are
|
---|
118 | interpreted as shell patterns, see *glob*(7).
|
---|
119 |
|
---|
120 | By default, only the request host is authorized. Use this directive to
|
---|
121 | enable cross-origin WebSockets.
|
---|
122 |
|
---|
123 | *accept-proxy-ip* <cidr...>
|
---|
124 | Allow the specified IPs to act as a proxy. Proxys have the ability to
|
---|
125 | overwrite the remote and local connection addresses (via the X-Forwarded-\*
|
---|
126 | HTTP header fields). The special name "localhost" accepts the loopback
|
---|
127 | addresses 127.0.0.0/8 and ::1/128. By default, all IPs are rejected.
|
---|
128 |
|
---|
129 | # IRC SERVICE
|
---|
130 |
|
---|
131 | soju exposes an IRC service called *BouncerServ* to manage the bouncer.
|
---|
132 | Commands can be sent via regular private messages
|
---|
133 | (_/msg BouncerServ <command> [args...]_). Commands may be written in full or
|
---|
134 | abbreviated form, for instance *network* can be abbreviated as *net* or just
|
---|
135 | *n*.
|
---|
136 |
|
---|
137 | *help* [command]
|
---|
138 | Show a list of commands. If _command_ is specified, show a help message for
|
---|
139 | the command.
|
---|
140 |
|
---|
141 | *network create* *-addr* <addr> [options...]
|
---|
142 | Connect to a new network at _addr_. _-addr_ is mandatory.
|
---|
143 |
|
---|
144 | _addr_ supports several connection types:
|
---|
145 |
|
---|
146 | - _[ircs://]<host>[:port]_ connects with TLS over TCP
|
---|
147 | - _irc+insecure://<host>[:port]_ connects with plain-text TCP
|
---|
148 | - _irc+unix:///<path>_ connects to a Unix socket
|
---|
149 |
|
---|
150 | Other options are:
|
---|
151 |
|
---|
152 | *-name* <name>
|
---|
153 | Short network name. This will be used instead of _addr_ to refer to the
|
---|
154 | network.
|
---|
155 |
|
---|
156 | *-username* <username>
|
---|
157 | Connect with the specified username. By default, the nickname is used.
|
---|
158 |
|
---|
159 | *-pass* <pass>
|
---|
160 | Connect with the specified server password.
|
---|
161 |
|
---|
162 | *-realname* <realname>
|
---|
163 | Connect with the specified real name. By default, the account's realname
|
---|
164 | is used if set, otherwise the network's nickname is used.
|
---|
165 |
|
---|
166 | *-nick* <nickname>
|
---|
167 | Connect with the specified nickname. By default, the account's username
|
---|
168 | is used.
|
---|
169 |
|
---|
170 | *-enabled* true|false
|
---|
171 | Enable or disable the network. If the network is disabled, the bouncer
|
---|
172 | won't connect to it. By default, the network is enabled.
|
---|
173 |
|
---|
174 | *-connect-command* <command>
|
---|
175 | Send the specified command as a raw IRC message right after connecting
|
---|
176 | to the server. This can be used to identify to an account when the
|
---|
177 | server doesn't support SASL.
|
---|
178 |
|
---|
179 | For instance, to identify with _NickServ_, the following command can be
|
---|
180 | used:
|
---|
181 |
|
---|
182 | ```
|
---|
183 | PRIVMSG NickServ :IDENTIFY <password>
|
---|
184 | ```
|
---|
185 |
|
---|
186 | The flag can be specified multiple times to send multiple IRC messages.
|
---|
187 | To clear all commands, set it to the empty string.
|
---|
188 |
|
---|
189 | *network update* <name> [options...]
|
---|
190 | Update an existing network. The options are the same as the
|
---|
191 | _network create_ command.
|
---|
192 |
|
---|
193 | When this command is executed, soju will disconnect and re-connect to the
|
---|
194 | network.
|
---|
195 |
|
---|
196 | *network delete* <name>
|
---|
197 | Disconnect and delete a network.
|
---|
198 |
|
---|
199 | *network quote* <name> <command>
|
---|
200 | Send a raw IRC line as-is to a network.
|
---|
201 |
|
---|
202 | *network status*
|
---|
203 | Show a list of saved networks and their current status.
|
---|
204 |
|
---|
205 | *channel status* [options...]
|
---|
206 | Show a list of saved channels and their current status.
|
---|
207 |
|
---|
208 | Options:
|
---|
209 |
|
---|
210 | *-network* <name>
|
---|
211 | Only show channels for the specified network. By default, only the
|
---|
212 | channels in the current network are displayed.
|
---|
213 |
|
---|
214 | *channel update* <name> [options...]
|
---|
215 | Update the options of an existing channel.
|
---|
216 |
|
---|
217 | Options are:
|
---|
218 |
|
---|
219 | *-relay-detached* <mode>
|
---|
220 | Set when to relay messages from detached channels to the user with a BouncerServ NOTICE.
|
---|
221 |
|
---|
222 | Modes are:
|
---|
223 |
|
---|
224 | *message*
|
---|
225 | Relay any message from this channel when detached.
|
---|
226 |
|
---|
227 | *highlight*
|
---|
228 | Relay only messages mentioning you when detached.
|
---|
229 |
|
---|
230 | *none*
|
---|
231 | Don't relay any messages from this channel when detached.
|
---|
232 |
|
---|
233 | *default*
|
---|
234 | Currently same as *highlight*. This is the default behaviour.
|
---|
235 |
|
---|
236 | *-reattach-on* <mode>
|
---|
237 | Set when to automatically reattach to detached channels.
|
---|
238 |
|
---|
239 | Modes are:
|
---|
240 |
|
---|
241 | *message*
|
---|
242 | Reattach to this channel when any message is received.
|
---|
243 |
|
---|
244 | *highlight*
|
---|
245 | Reattach to this channel when any message mentioning you is received.
|
---|
246 |
|
---|
247 | *none*
|
---|
248 | Never automatically reattach to this channel.
|
---|
249 |
|
---|
250 | *default*
|
---|
251 | Currently same as *none*. This is the default behaviour.
|
---|
252 |
|
---|
253 | *-detach-after* <duration>
|
---|
254 | Automatically detach this channel after the specified duration has elapsed without receving any message corresponding to *-detach-on*.
|
---|
255 |
|
---|
256 | Example duration values: *1h30m*, *30s*, *2.5h*.
|
---|
257 |
|
---|
258 | Setting this value to 0 will disable this behaviour, i.e. this channel will never be automatically detached. This is the default behaviour.
|
---|
259 |
|
---|
260 | *-detach-on* <mode>
|
---|
261 | 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.
|
---|
262 | Joining, reattaching, sending a message, or changing any channel option will reset the timer, in addition to the messages specified by the mode.
|
---|
263 |
|
---|
264 | Modes are:
|
---|
265 |
|
---|
266 | *message*
|
---|
267 | Receiving any message from this channel will reset the auto-detach timer.
|
---|
268 |
|
---|
269 | *highlight*
|
---|
270 | Receiving any message mentioning you from this channel will reset the auto-detach timer.
|
---|
271 |
|
---|
272 | *none*
|
---|
273 | Receiving messages from this channel will not reset the auto-detach timer. Sending messages or joining the channel will still reset the timer.
|
---|
274 |
|
---|
275 | *default*
|
---|
276 | Currently same as *message*. This is the default behaviour.
|
---|
277 |
|
---|
278 | *certfp generate* [options...] <network name>
|
---|
279 | Generate self-signed certificate and use it for authentication (via SASL
|
---|
280 | EXTERNAL).
|
---|
281 |
|
---|
282 | Generates a RSA-3072 private key by default.
|
---|
283 |
|
---|
284 | Options are:
|
---|
285 |
|
---|
286 | *-key-type* <type>
|
---|
287 | Private key algoritm to use. Valid values are: rsa, ecdsa, ed25519.
|
---|
288 | ecdsa uses NIST P-521 curve.
|
---|
289 |
|
---|
290 | *-bits* <bits>
|
---|
291 | Size of RSA key to generate. Ignored for other key types.
|
---|
292 |
|
---|
293 | *certfp fingerprint* <network name>
|
---|
294 | Show SHA-1 and SHA-256 fingerprints for the certificate
|
---|
295 | currently used with the network.
|
---|
296 |
|
---|
297 | *sasl set-plain* <network name> <username> <password>
|
---|
298 | Set SASL PLAIN credentials.
|
---|
299 |
|
---|
300 | *sasl reset* <network name>
|
---|
301 | Disable SASL authentication and remove stored credentials.
|
---|
302 |
|
---|
303 | *user create* -username <username> -password <password> [options...]
|
---|
304 | Create a new soju user. Only admin users can create new accounts.
|
---|
305 | The _-username_ and _-password_ flags are mandatory.
|
---|
306 |
|
---|
307 | Other options are:
|
---|
308 |
|
---|
309 | *-admin*
|
---|
310 | Make the new user an administrator.
|
---|
311 |
|
---|
312 | *-realname* <realname>
|
---|
313 | Set the user's realname. This is used as a fallback if there is no
|
---|
314 | realname set for a network.
|
---|
315 |
|
---|
316 | *user update* [-password <password>] [-realname <realname>]
|
---|
317 | Update the current user. The options are the same as the _user create_
|
---|
318 | command.
|
---|
319 |
|
---|
320 | *user delete* <username>
|
---|
321 | Delete a soju user. Only admins can delete accounts.
|
---|
322 |
|
---|
323 | # AUTHORS
|
---|
324 |
|
---|
325 | Maintained by Simon Ser <contact@emersion.fr>, who is assisted by other
|
---|
326 | open-source contributors. For more information about soju development, see
|
---|
327 | https://sr.ht/~emersion/soju.
|
---|