[169] | 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
|
---|
[284] | 26 | server supports SASL. When parting a channel with the reason "detach", the
|
---|
| 27 | channel will be detached instead of being left.
|
---|
[169] | 28 |
|
---|
[214] | 29 | When all clients are disconnected from the bouncer, the user is automatically
|
---|
| 30 | marked as away.
|
---|
| 31 |
|
---|
[169] | 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 |
|
---|
[190] | 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 |
|
---|
[475] | 47 | soju will reload the TLS certificate and key when it receives the HUP signal.
|
---|
| 48 |
|
---|
[169] | 49 | # OPTIONS
|
---|
| 50 |
|
---|
| 51 | *-h, -help*
|
---|
| 52 | Show help message and quit.
|
---|
| 53 |
|
---|
| 54 | *-config* <path>
|
---|
[264] | 55 | Path to the config file. If unset, a default config file is used.
|
---|
[169] | 56 |
|
---|
| 57 | *-debug*
|
---|
| 58 | Enable debug logging (this will leak sensitive information such as
|
---|
| 59 | passwords).
|
---|
| 60 |
|
---|
[317] | 61 | *-listen* <uri>
|
---|
[491] | 62 | Listening URI (default: ":6697"). Can be specified multiple times.
|
---|
[169] | 63 |
|
---|
| 64 | # CONFIG FILE
|
---|
| 65 |
|
---|
| 66 | The config file has one directive per line.
|
---|
| 67 |
|
---|
[368] | 68 | Example:
|
---|
| 69 |
|
---|
| 70 | ```
|
---|
| 71 | listen ircs://
|
---|
| 72 | tls cert.pem key.pem
|
---|
| 73 | hostname example.org
|
---|
| 74 | ```
|
---|
| 75 |
|
---|
| 76 | The following directives are supported:
|
---|
| 77 |
|
---|
[317] | 78 | *listen* <uri>
|
---|
| 79 | Listening URI (default: ":6697").
|
---|
[169] | 80 |
|
---|
[317] | 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)
|
---|
[466] | 87 | - _unix:///<path>_ listens on a Unix domain socket
|
---|
[323] | 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)
|
---|
[386] | 92 | - _ident://[host][:port]_ listens for plain-text ident connections (default
|
---|
| 93 | port: 113)
|
---|
[317] | 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 |
|
---|
[169] | 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 |
|
---|
[507] | 104 | *db* sqlite3 <path>
|
---|
| 105 | Set the SQLite database path (default: "soju.db" in the current directory).
|
---|
[169] | 106 |
|
---|
[507] | 107 | *log* fs <path>
|
---|
[264] | 108 | Path to the bouncer logs root directory, or empty to disable logging. By
|
---|
| 109 | default, logging is disabled.
|
---|
[178] | 110 |
|
---|
[323] | 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 |
|
---|
[370] | 115 | *accept-proxy-ip* <cidr...>
|
---|
| 116 | Allow the specified IPs to act as a proxy. Proxys have the ability to
|
---|
[372] | 117 | overwrite the remote and local connection addresses (via the X-Forwarded-\*
|
---|
[426] | 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.
|
---|
[370] | 120 |
|
---|
[169] | 121 | # IRC SERVICE
|
---|
| 122 |
|
---|
| 123 | soju exposes an IRC service called *BouncerServ* to manage the bouncer.
|
---|
| 124 | Commands can be sent via regular private messages
|
---|
| 125 | (_/msg BouncerServ <command> [args...]_). Commands may be written in full or
|
---|
| 126 | abbreviated 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...]
|
---|
[269] | 134 | Connect to a new network at _addr_. _-addr_ is mandatory.
|
---|
[169] | 135 |
|
---|
[269] | 136 | _addr_ supports several connection types:
|
---|
[317] | 137 |
|
---|
[353] | 138 | - _[ircs://]<host>[:port]_ connects with TLS over TCP
|
---|
| 139 | - _irc+insecure://<host>[:port]_ connects with plain-text TCP
|
---|
[369] | 140 | - _irc+unix:///<path>_ connects to a Unix socket
|
---|
[269] | 141 |
|
---|
| 142 | Other options are:
|
---|
| 143 |
|
---|
[169] | 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 |
|
---|
[524] | 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 |
|
---|
[361] | 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 |
|
---|
[329] | 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 |
|
---|
[436] | 189 | *channel update* <name> [options...]
|
---|
| 190 | Update the options of an existing channel.
|
---|
| 191 |
|
---|
| 192 | Options are:
|
---|
| 193 |
|
---|
| 194 | *-relay-detached* <mode>
|
---|
| 195 | Set when to relay messages from detached channels to the user with a BouncerServ NOTICE.
|
---|
| 196 |
|
---|
| 197 | Modes are:
|
---|
| 198 |
|
---|
| 199 | *message*
|
---|
| 200 | Relay any message from this channel when detached.
|
---|
| 201 |
|
---|
| 202 | *highlight*
|
---|
| 203 | Relay only messages mentioning you when detached.
|
---|
| 204 |
|
---|
| 205 | *none*
|
---|
| 206 | Don't relay any messages from this channel when detached.
|
---|
| 207 |
|
---|
| 208 | *default*
|
---|
| 209 | Currently same as *highlight*. This is the default behaviour.
|
---|
| 210 |
|
---|
| 211 | *-reattach-on* <mode>
|
---|
| 212 | Set when to automatically reattach to detached channels.
|
---|
| 213 |
|
---|
| 214 | Modes are:
|
---|
| 215 |
|
---|
| 216 | *message*
|
---|
| 217 | Reattach to this channel when any message is received.
|
---|
| 218 |
|
---|
| 219 | *highlight*
|
---|
| 220 | Reattach to this channel when any message mentioning you is received.
|
---|
| 221 |
|
---|
| 222 | *none*
|
---|
| 223 | Never automatically reattach to this channel.
|
---|
| 224 |
|
---|
| 225 | *default*
|
---|
| 226 | Currently same as *none*. This is the default behaviour.
|
---|
| 227 |
|
---|
| 228 | *-detach-after* <duration>
|
---|
| 229 | Automatically detach this channel after the specified duration has elapsed without receving any message corresponding to *-detach-on*.
|
---|
| 230 |
|
---|
| 231 | Example duration values: *1h30m*, *30s*, *2.5h*.
|
---|
| 232 |
|
---|
| 233 | Setting this value to 0 will disable this behaviour, i.e. this channel will never be automatically detached. This is the default behaviour.
|
---|
| 234 |
|
---|
| 235 | *-detach-on* <mode>
|
---|
| 236 | 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.
|
---|
| 237 | Joining, reattaching, sending a message, or changing any channel option will reset the timer, in addition to the messages specified by the mode.
|
---|
| 238 |
|
---|
| 239 | Modes are:
|
---|
| 240 |
|
---|
| 241 | *message*
|
---|
| 242 | Receiving any message from this channel will reset the auto-detach timer.
|
---|
| 243 |
|
---|
| 244 | *highlight*
|
---|
| 245 | Receiving any message mentioning you from this channel will reset the auto-detach timer.
|
---|
| 246 |
|
---|
| 247 | *none*
|
---|
| 248 | Receiving messages from this channel will not reset the auto-detach timer. Sending messages or joining the channel will still reset the timer.
|
---|
| 249 |
|
---|
| 250 | *default*
|
---|
| 251 | Currently same as *message*. This is the default behaviour.
|
---|
| 252 |
|
---|
[361] | 253 | *certfp generate* [options...] <network name>
|
---|
[365] | 254 | Generate self-signed certificate and use it for authentication (via SASL
|
---|
| 255 | EXTERNAL).
|
---|
[307] | 256 |
|
---|
[365] | 257 | Generates a RSA-3072 private key by default.
|
---|
[307] | 258 |
|
---|
| 259 | Options are:
|
---|
| 260 |
|
---|
| 261 | *-key-type* <type>
|
---|
| 262 | Private key algoritm to use. Valid values are: rsa, ecdsa, ed25519.
|
---|
| 263 | ecdsa uses NIST P-521 curve.
|
---|
| 264 |
|
---|
| 265 | *-bits* <bits>
|
---|
| 266 | Size of RSA key to generate. Ignored for other key types.
|
---|
| 267 |
|
---|
| 268 | *certfp fingerprint* <network name>
|
---|
| 269 | Show SHA-1 and SHA-256 fingerprints for the certificate
|
---|
| 270 | currently used with the network.
|
---|
| 271 |
|
---|
[363] | 272 | *sasl set-plain* <network name> <username> <password>
|
---|
| 273 | Set SASL PLAIN credentials.
|
---|
| 274 |
|
---|
[364] | 275 | *sasl reset* <network name>
|
---|
| 276 | Disable SASL authentication and remove stored credentials.
|
---|
| 277 |
|
---|
[329] | 278 | *user create* -username <username> -password <password> [-admin]
|
---|
[331] | 279 | Create a new soju user. Only admin users can create new accounts.
|
---|
[329] | 280 |
|
---|
[525] | 281 | *user delete* <username>
|
---|
| 282 | Delete a soju user. Only admins can delete accounts.
|
---|
| 283 |
|
---|
[320] | 284 | *change-password* <new password>
|
---|
| 285 | Change current user password.
|
---|
| 286 |
|
---|
[169] | 287 | # AUTHORS
|
---|
| 288 |
|
---|
| 289 | Maintained by Simon Ser <contact@emersion.fr>, who is assisted by other
|
---|
| 290 | open-source contributors. For more information about soju development, see
|
---|
[321] | 291 | https://sr.ht/~emersion/soju.
|
---|