biboumi.1.md 12 KB
Newer Older
louiz’'s avatar
louiz’ committed
1
BIBOUMI 1 "2014-06-02"
2 3 4 5 6
======================

NAME
----

louiz’'s avatar
louiz’ committed
7
biboumi - XMPP gateway to IRC
8 9 10 11

SYNOPSIS
--------

louiz’'s avatar
louiz’ committed
12
`biboumi` [`config_filename`]
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48

DESCRIPTION
-----------

Biboumi is an XMPP gateway that connects to IRC servers and translates
between the two protocols. It can be used to access IRC channels using any
XMPP client as if these channels were XMPP MUCs.

OPTIONS
-------

Available options:

`config_filename`

  Specify the file to read for configuration. See *CONFIG* section for more
  details on its content.

CONFIG
------

The configuration file uses a simple format of the form
`"option=value"`. Here is a description of each possible option:

`hostname` (mandatory)

  The hostname served by the XMPP gateway.  This domain must be configured in
  the XMPP server as an external component.  See the manual for your XMPP
  server for more information.

`password` (mandatory)

  The password used to authenticate the XMPP component to your XMPP server.
  This password must be configured in the XMPP server, associated with the
  external component on *hostname*.

49 50
`admin`

louiz’'s avatar
louiz’ committed
51 52 53 54
  The bare JID of the gateway administrator. This JID will have more
  privileges than other standard users (the admin thus needs to check their
  privileges), for example some administration ad-hoc commands will only be
  available to that JID.
55

56 57 58
`log_file`

  A filename into which logs are written.  If none is provided, the logs are
louiz’'s avatar
louiz’ committed
59
  written on standard output.
60 61 62

`log_level`

louiz’'s avatar
louiz’ committed
63
  Indicate what type of log messages to write in the logs.  Value can be
louiz’'s avatar
louiz’ committed
64 65
  from 0 to 3.  0 is debug, 1 is info, 2 is warning, 3 is error.  The
  default is 0, but a more practical value for production use is 1.
66

louiz’'s avatar
louiz’ committed
67 68 69 70
The configuration can be re-read at runtime (you can for example change the
log level without having to restart biboumi) by sending SIGUSR1 or SIGUSR2
(see kill(1)) to the process.

71 72 73 74
USAGE
-----

When started, biboumi connects, without encryption (see *SECURITY*), to the
louiz’'s avatar
louiz’ committed
75 76 77 78 79
local XMPP server on the port `5347` and authenticates with the provided
password.  Biboumi then serves the configured `hostname`: this means that
all XMPP stanza with a `to` JID on that domain will be forwarded to biboumi
by the XMPP server, and biboumi will only send messages coming from that
hostname.
80

louiz’'s avatar
louiz’ committed
81
When a user joins an IRC channel on an IRC server (see *Join an IRC
82 83 84 85 86 87 88
channel*), biboumi connects to the remote IRC server, sets the user’s nick
as requested, and then tries to join the specified channel.  If the same
user subsequently tries to connect to an other channel on the same server,
the same IRC connection is used.  If, however, an other user wants to join
an IRC channel on that same IRC server, biboumi opens a new connection to
that server.  Biboumi connects once to each IRC server, for each user on it.

louiz’'s avatar
louiz’ committed
89
To cleanly shutdown the component, send a SIGINT or SIGTERM signal to it.
louiz’'s avatar
louiz’ committed
90
It will send messages to all connected IRC and XMPP servers to indicate a
louiz’'s avatar
louiz’ committed
91 92 93 94
reason why the users are being disconnected.  Biboumi exits when the end of
communication is acknowledged by all IRC servers.  If one or more IRC
servers do not respond, biboumi will only exit if it receives the same
signal again or if a 2 seconds delay has passed.
louiz’'s avatar
louiz’ committed
95

96 97 98 99 100 101 102 103 104
### Addressing

IRC entities are represented by XMPP JIDs.  The domain part of the JID is
the domain served by biboumi, and the local part depends on the concerned
entity.

IRC channels and IRC users JIDs have a localpart formed like this:
`name`, the `'%'` separator and the `irc_server`.

louiz’'s avatar
louiz’ committed
105 106 107 108
If the IRC channel you want to adress starts with the `'#'` character (or an
other character, announced by the IRC server, like `'&'`, `'+'` or `'!'`),
then you must include it in the JID.  Some other gateway implementations, as
well as some IRC clients, do not require them to be started by one of these
109 110
characters, adding an implicit `'#'` in that case.  Biboumi does not do that
because this gets confusing when trying to understand the difference between
louiz’'s avatar
louiz’ committed
111 112 113 114 115 116
the channels *#foo*, and *##foo*.

The name part can also be empty (for example `%irc.example.com`), in that
case this represents the virtual channel provided by biboumi.  See *Connect
to an IRC server* for more details.

117

louiz’'s avatar
louiz’ committed
118 119 120 121 122 123 124 125 126 127 128
On XMPP, the node part of the JID can only be lowercase.  On the other hand,
IRC nicknames are case-insensitive, this means that the nicknames toto,
Toto, tOtO and TOTO all represent the same IRC user.  This means you can
talk to the user toto, and this will work.

Examples:

  `#foo%irc.example.com@biboumi.example.com` is the #foo IRC channel, on the
  irc.example.com IRC server, and this is served by the biboumi instance on
  biboumi.example.com

louiz’'s avatar
louiz’ committed
129 130 131 132 133 134 135
  `toto%irc.example.com@biboumi.example.com` is the IRC user named toto, or
  TotO, etc.

  `irc.example.com@biboumi.example.com` is the IRC server irc.example.com.

  `%irc.example.com@biboumi.example.com` is the virtual channel provided by
  biboumi, for the IRC server irc.example.com.
louiz’'s avatar
louiz’ committed
136

137
If compiled with Libidn, an IRC user has a bare JID representing the
louiz’'s avatar
louiz’ committed
138 139
“hostname” provided by the IRC server.  This JID can only be used to set IRC
modes (for example to ban a user based on its IP), or to identify user.
140 141 142 143 144 145

### Join an IRC channel

To join an IRC channel `#foo` on the IRC server `irc.example.com`,
join the XMPP MUC `#foo%irc.example.com@hostname`.

146 147 148 149 150 151 152
### Connect to an IRC server

The connection to the IRC server is automatically made when the user tries
to join any channel on that IRC server.  The connection is closed whenever
the last channel on that server is left by the user.  To be able to stay
connected to an IRC server without having to be in a real IRC channel,
biboumi provides a virtual channel on the jid
louiz’'s avatar
louiz’ committed
153
`%irc.example.com@biboumi.example.com`.  For example if you want to join the
154
channel `#foo` on the server `irc.example.com`, but you need to authenticate
louiz’'s avatar
louiz’ committed
155 156 157 158 159
to a bot of the server before you’re allowed to join it, you can first join
the room `%irc.example.com@biboumi.example.com` (this will effectively
connect you to the IRC server without joining any room), then send your
authentication message to the user `bot%irc.example.com@biboumi.example.com"
and finally join the room `#foo%irc.example.com@biboumi.example.com`.
160

161 162 163 164 165 166
### Channel messages

On XMPP, unlike on IRC, the displayed order of the messages is the same for
all participants of a MUC.  Biboumi can not however provide this feature, as
it cannot know whether the IRC server has received and forwarded the
messages to other users.  This means that the order of the messages
louiz’'s avatar
louiz’ committed
167 168
displayed in your XMPP client may not be the same than the order on other
IRC users’.
169 170 171 172 173

### Nicknames

On IRC, nicknames are server-wide.  This means that one user only has one
single nickname at one given time on all the channels of a server. This is
louiz’'s avatar
louiz’ committed
174
different from XMPP where a user can have a different nick on each MUC,
175 176 177 178 179 180 181 182 183 184 185 186
even if these MUCs are on the same server.

This means that the nick you choose when joining your first IRC channel on a
given IRC server will be your nickname in all other channels that you join
on that same IRC server.
If you explicitely change your nickname on one channel, your nickname will
be changed on all channels on the same server as well.

### Private messages

Private messages are handled differently on IRC and on XMPP.  On IRC, you
talk directly to one server-user: toto on the channel #foo is the same user
louiz’'s avatar
louiz’ committed
187
as toto on the channel #bar (as long as these two channels are on the same
188
IRC server).  Using biboumi, there is no way to receive a message from a
louiz’'s avatar
louiz’ committed
189 190 191 192
room participant (from a jid like
#test%irc.example.com@biboumi.example.com/nickname).  Instead, private
messages are received from and sent to the user (using a jid like
nickname%irc.example.com@biboumi.example.com).
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224

### Notices

Notices are received exactly like private messages.  It is not possible to
send a notice.

### Kicks and bans

Kicks are transparently translated from one protocol to another.  However
banning an XMPP participant has no effect.  To ban an user you need to set a
mode +b on that user nick or host (see *MODES*) and then kick it.

### Encoding

On XMPP, the encoding is always `UTF-8`, whereas on IRC the encoding of
each message can be anything.

This means that biboumi has to convert everything coming from IRC into UTF-8
without knowing the encoding of the received messages.  To do so, it checks
if each message is UTF-8 valid, if not it tries to convert from
`iso_8859-1` (because this appears to be the most common case, at least
on the channels I visit) to `UTF-8`.  If that conversion fails at some
point, a placeholder character `'�'` is inserted to indicate this
decoding error.

Messages are always sent in UTF-8 over IRC, no conversion is done in that
direction.

### IRC modes

One feature that doesn’t exist on XMPP but does on IRC is the `modes`.
Although some of these modes have a correspondance in the XMPP world (for
louiz’'s avatar
louiz’ committed
225 226
example the `+o` mode on a user corresponds to the `moderator` role in
XMPP), it is impossible to map all these modes to an XMPP feature.  To
227 228 229
circumvent this problem, biboumi provides a raw notification when modes are
changed, and lets the user change the modes directly.

louiz’'s avatar
louiz’ committed
230 231 232 233 234 235
To change modes, simply send a message starting with “`/mode`” followed by
the modes and the arguments you want to send to the IRC server.  For example
“/mode +aho louiz”.  Note that your XMPP client may interprete messages
begining with “/” like a command.  To actually send a message starting with
a slash, you may need to start your message with “//mode” or “/say /mode”,
depending on your client.
236 237 238 239 240 241 242 243

When a mode is changed, the user is notified by a message coming from the
MUC bare JID, looking like “Mode #foo [+ov] [toto tutu]”.  In addition, if
the mode change can be translated to an XMPP feature, the user will be
notified of this XMPP event as well. For example if a mode “+o toto” is
received, then toto’s role will be changed to moderator.  The mapping
between IRC modes and XMPP features is as follow:

louiz’'s avatar
louiz’ committed
244 245 246 247
`+q`

  Sets the participant’s role to `moderator` and its affiliation to `owner`.

248 249 250 251
`+a`

  Sets the participant’s role to `moderator` and its affiliation to `owner`.

252 253
`+o`

254
  Sets the participant’s role to `moderator` and its affiliation to  `admin`.
255

256
`+h`
257

258
  Sets the participant’s role to `moderator` and its affiliation to  `member`.
259 260 261

`+v`

262
  Sets the participant’s role to `participant` and its affiliation to `member`.
263

louiz’'s avatar
louiz’ committed
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280
### Ad-hoc commands

Biboumi supports a few ad-hoc commands, as described in the XEP 0050.

  - ping: Just respond “pong”

  - hello: Provide a form, where the user enters their name, and biboumi
    responds with a nice greeting.

  - disconnect-user: Available to the administrator only. The user provides
    a list of JIDs, and a quit message. All these users are disconnected
    from all the IRC servers to which they were connected, using the
    provided quit message. Sending SIGINT to biboumi is equivalent to using
    this command by selecting all the connected JIDs and using the “Gateway
    shutdown” quit message, except that biboumi does not exit when using
    this ad-hoc command.

281 282 283 284 285 286
SECURITY
--------

Biboumi does not provide any encryption mechanism: connection to the XMPP
server MUST be made on localhost.  The XMPP server is not supposed to accept
non-local connection from components, thus encryption is useless.  IRC
louiz’'s avatar
louiz’ committed
287
SSL/TLS is also not yet implemented.
288

louiz’'s avatar
louiz’ committed
289 290 291 292 293 294 295 296 297 298 299 300 301
Biboumi also does not check if the received JIDs are properly formatted
using nodeprep.  This must be done by the XMPP server to which biboumi is
directly connected.

Remember that the administrator of the gateway you use is able to view all
your IRC conversations, whether you’re using encryption or not.  This is
exactly as if you were running your IRC client on someone else’s server.

Biboumi does not yet provide a way to ban users from connecting to it, has
no protection against flood or any sort of abuse that your users may cause
on the IRC servers. Some XMPP server however offer the possibility to
restrict what JID can access a gateway. Use that feature if you wish to
grant access to your biboumi instance only to a list of users.
302 303 304 305

AUTHORS
-------

louiz’'s avatar
louiz’ committed
306 307 308 309 310 311
This software and man page are both written by Florent Le Coz.

LICENSE
-------

Biboumi is released under the zlib license.