[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 |
|
---|
| 104 | *sql* <driver> <source>
|
---|
[254] | 105 | Set the SQL driver settings. The only supported driver is "sqlite3". The
|
---|
[264] | 106 | source is the path to the SQLite database file. By default, the path to the
|
---|
| 107 | database file is "soju.db".
|
---|
[169] | 108 |
|
---|
[178] | 109 | *log* <path>
|
---|
[264] | 110 | Path to the bouncer logs root directory, or empty to disable logging. By
|
---|
| 111 | default, logging is disabled.
|
---|
[178] | 112 |
|
---|
[323] | 113 | *http-origin* <patterns...>
|
---|
| 114 | List of allowed HTTP origins for WebSocket listeners. The parameters are
|
---|
| 115 | interpreted as shell patterns, see *glob*(7).
|
---|
| 116 |
|
---|
[370] | 117 | *accept-proxy-ip* <cidr...>
|
---|
| 118 | Allow the specified IPs to act as a proxy. Proxys have the ability to
|
---|
[372] | 119 | overwrite the remote and local connection addresses (via the X-Forwarded-\*
|
---|
[426] | 120 | HTTP header fields). The special name "localhost" accepts the loopback
|
---|
| 121 | addresses 127.0.0.0/8 and ::1/128. By default, all IPs are rejected.
|
---|
[370] | 122 |
|
---|
[169] | 123 | # IRC SERVICE
|
---|
| 124 |
|
---|
| 125 | soju exposes an IRC service called *BouncerServ* to manage the bouncer.
|
---|
| 126 | Commands can be sent via regular private messages
|
---|
| 127 | (_/msg BouncerServ <command> [args...]_). Commands may be written in full or
|
---|
| 128 | abbreviated form, for instance *network* can be abbreviated as *net* or just
|
---|
| 129 | *n*.
|
---|
| 130 |
|
---|
| 131 | *help* [command]
|
---|
| 132 | Show a list of commands. If _command_ is specified, show a help message for
|
---|
| 133 | the command.
|
---|
| 134 |
|
---|
| 135 | *network create* *-addr* <addr> [options...]
|
---|
[269] | 136 | Connect to a new network at _addr_. _-addr_ is mandatory.
|
---|
[169] | 137 |
|
---|
[269] | 138 | _addr_ supports several connection types:
|
---|
[317] | 139 |
|
---|
[353] | 140 | - _[ircs://]<host>[:port]_ connects with TLS over TCP
|
---|
| 141 | - _irc+insecure://<host>[:port]_ connects with plain-text TCP
|
---|
[369] | 142 | - _irc+unix:///<path>_ connects to a Unix socket
|
---|
[269] | 143 |
|
---|
| 144 | Other options are:
|
---|
| 145 |
|
---|
[169] | 146 | *-name* <name>
|
---|
| 147 | Short network name. This will be used instead of _addr_ to refer to the
|
---|
| 148 | network.
|
---|
| 149 |
|
---|
| 150 | *-username* <username>
|
---|
| 151 | Connect with the specified username. By default, the nickname is used.
|
---|
| 152 |
|
---|
| 153 | *-pass* <pass>
|
---|
| 154 | Connect with the specified server password.
|
---|
| 155 |
|
---|
| 156 | *-realname* <realname>
|
---|
| 157 | Connect with the specified real name. By default, the nickname is used.
|
---|
| 158 |
|
---|
| 159 | *-nick* <nickname>
|
---|
| 160 | Connect with the specified nickname. By default, the account's username
|
---|
| 161 | is used.
|
---|
| 162 |
|
---|
[361] | 163 | *network update* <name> [options...]
|
---|
| 164 | Update an existing network. The options are the same as the
|
---|
| 165 | _network create_ command.
|
---|
| 166 |
|
---|
| 167 | When this command is executed, soju will disconnect and re-connect to the
|
---|
| 168 | network.
|
---|
| 169 |
|
---|
[329] | 170 | *network delete* <name>
|
---|
| 171 | Disconnect and delete a network.
|
---|
| 172 |
|
---|
| 173 | *network status*
|
---|
| 174 | Show a list of saved networks and their current status.
|
---|
| 175 |
|
---|
[436] | 176 | *channel update* <name> [options...]
|
---|
| 177 | Update the options of an existing channel.
|
---|
| 178 |
|
---|
| 179 | Options are:
|
---|
| 180 |
|
---|
| 181 | *-relay-detached* <mode>
|
---|
| 182 | Set when to relay messages from detached channels to the user with a BouncerServ NOTICE.
|
---|
| 183 |
|
---|
| 184 | Modes are:
|
---|
| 185 |
|
---|
| 186 | *message*
|
---|
| 187 | Relay any message from this channel when detached.
|
---|
| 188 |
|
---|
| 189 | *highlight*
|
---|
| 190 | Relay only messages mentioning you when detached.
|
---|
| 191 |
|
---|
| 192 | *none*
|
---|
| 193 | Don't relay any messages from this channel when detached.
|
---|
| 194 |
|
---|
| 195 | *default*
|
---|
| 196 | Currently same as *highlight*. This is the default behaviour.
|
---|
| 197 |
|
---|
| 198 | *-reattach-on* <mode>
|
---|
| 199 | Set when to automatically reattach to detached channels.
|
---|
| 200 |
|
---|
| 201 | Modes are:
|
---|
| 202 |
|
---|
| 203 | *message*
|
---|
| 204 | Reattach to this channel when any message is received.
|
---|
| 205 |
|
---|
| 206 | *highlight*
|
---|
| 207 | Reattach to this channel when any message mentioning you is received.
|
---|
| 208 |
|
---|
| 209 | *none*
|
---|
| 210 | Never automatically reattach to this channel.
|
---|
| 211 |
|
---|
| 212 | *default*
|
---|
| 213 | Currently same as *none*. This is the default behaviour.
|
---|
| 214 |
|
---|
| 215 | *-detach-after* <duration>
|
---|
| 216 | Automatically detach this channel after the specified duration has elapsed without receving any message corresponding to *-detach-on*.
|
---|
| 217 |
|
---|
| 218 | Example duration values: *1h30m*, *30s*, *2.5h*.
|
---|
| 219 |
|
---|
| 220 | Setting this value to 0 will disable this behaviour, i.e. this channel will never be automatically detached. This is the default behaviour.
|
---|
| 221 |
|
---|
| 222 | *-detach-on* <mode>
|
---|
| 223 | 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.
|
---|
| 224 | Joining, reattaching, sending a message, or changing any channel option will reset the timer, in addition to the messages specified by the mode.
|
---|
| 225 |
|
---|
| 226 | Modes are:
|
---|
| 227 |
|
---|
| 228 | *message*
|
---|
| 229 | Receiving any message from this channel will reset the auto-detach timer.
|
---|
| 230 |
|
---|
| 231 | *highlight*
|
---|
| 232 | Receiving any message mentioning you from this channel will reset the auto-detach timer.
|
---|
| 233 |
|
---|
| 234 | *none*
|
---|
| 235 | Receiving messages from this channel will not reset the auto-detach timer. Sending messages or joining the channel will still reset the timer.
|
---|
| 236 |
|
---|
| 237 | *default*
|
---|
| 238 | Currently same as *message*. This is the default behaviour.
|
---|
| 239 |
|
---|
[361] | 240 | *certfp generate* [options...] <network name>
|
---|
[365] | 241 | Generate self-signed certificate and use it for authentication (via SASL
|
---|
| 242 | EXTERNAL).
|
---|
[307] | 243 |
|
---|
[365] | 244 | Generates a RSA-3072 private key by default.
|
---|
[307] | 245 |
|
---|
| 246 | Options are:
|
---|
| 247 |
|
---|
| 248 | *-key-type* <type>
|
---|
| 249 | Private key algoritm to use. Valid values are: rsa, ecdsa, ed25519.
|
---|
| 250 | ecdsa uses NIST P-521 curve.
|
---|
| 251 |
|
---|
| 252 | *-bits* <bits>
|
---|
| 253 | Size of RSA key to generate. Ignored for other key types.
|
---|
| 254 |
|
---|
| 255 | *certfp fingerprint* <network name>
|
---|
| 256 | Show SHA-1 and SHA-256 fingerprints for the certificate
|
---|
| 257 | currently used with the network.
|
---|
| 258 |
|
---|
[363] | 259 | *sasl set-plain* <network name> <username> <password>
|
---|
| 260 | Set SASL PLAIN credentials.
|
---|
| 261 |
|
---|
[364] | 262 | *sasl reset* <network name>
|
---|
| 263 | Disable SASL authentication and remove stored credentials.
|
---|
| 264 |
|
---|
[329] | 265 | *user create* -username <username> -password <password> [-admin]
|
---|
[331] | 266 | Create a new soju user. Only admin users can create new accounts.
|
---|
[329] | 267 |
|
---|
[320] | 268 | *change-password* <new password>
|
---|
| 269 | Change current user password.
|
---|
| 270 |
|
---|
[169] | 271 | # AUTHORS
|
---|
| 272 |
|
---|
| 273 | Maintained by Simon Ser <contact@emersion.fr>, who is assisted by other
|
---|
| 274 | open-source contributors. For more information about soju development, see
|
---|
[321] | 275 | https://sr.ht/~emersion/soju.
|
---|