IRC Bouncer

From Project Segfault Wiki
Revision as of 18:36, 30 April 2023 by Alexlehm (talk | contribs)

Along with your pubnix account, you get access to our IRC bouncer, soju.

Soju is a modern IRC bouncer, which supports the new ircv3 features.

Soju uses the pubnixes PAM for authentication, meaning it uses the same password as your pubnix user.

Your current password can be found at ~/pass. Access it by running:

cat ~/pass

You can change it by running passwd.

The IRC client we recommend is weechat. However, there are many other clients out there as well which you can try out.

Weechat is pre-installed on the pubnix. After running it, you will be presented with a tui.

Now, you can add the server with the following command:

/server add soju p.projectsegfau.lt/6697 -ssl -username=YOUR_USERNAME -password=YOUR_PASSWORD -autoconnect

Now, install soju.py plugin, which will pre-configure a lot of stuff for you

/set script.scripts.download_enabled on /script install soju.py

You can also install the following plugins that help a lot with daily usage of weechat:

/script install go.py /script install autosort.py

Past this, you need to enable the IRCv3 features:

/set irc.server_default.capabilities account-notify,away-notify,cap-notify,chghost,extended-join,invite-notify,multi-prefix,server-time,userhost-in-names /save

Now, close weechat with /quit, and re-open it. At this point, you will be connected to our soju instance and see the motd.

After this, you need to add you servers.

To do so, you have to message the BouncerServ. The example below is for libera.chat, one of the most popular irc networks. It shouldn't be very different for other networks

/msg BouncerServ network create -addr irc.libera.chat -name YOUR_NICK -username YOUR_USERNAME_ON_IRC_NETWORK -pass YOUR_IRC_NETWORK_PASS -realname "Self Explanatory" -enabled true

After creating all your networks, re-open weechat again, and it should be loaded. Switch to the pane of the specific network or a channel in that network to join other rooms in that network. You can easily do this with go.py:

/go <autocomplete>

After adding all your channels, you can sort them using autosort.py:

/autosort

By default, it sorts network-wise + alphabetically.

If you want to use a IRC client that does not directly support bouncer connections, you can use it as a regular IRC server to connect to and add a connection for each network you connect to and use chat messages to configure everything.

To get the basic configuration, you connect to p.projectsegfau.lt port 6697 with tls and user your username as login and set the password for the network connect. The username provided by the irc client (usually called ident or the local username) is username/networkname@computername. This will autoconfigure a IRC connection to the network and set up the username mapping to automatically remove the networkname prefix from the messages. If you are using multiple connections at the same time, use a different computername for each connection so that the history playback works for each and you do not get the messages mixed up.

When connecting to the network via the bouncer, you will get a local connection to the bouncer and the bouncer will connect to the actual network, e.g. irc.libera.chat and no not log you in yet since it has no information about your user, also the connection is plain by default but you can change all that later and it will remember the settings.

To configure the bouncer, you can send a PM to BouncerServ with /query BouncerServ help, after that you can type each command into the PM dialogue to set up your config.

You can configure NickServ login, use SASL or configure a certfp login (in this case the bouncer will simply create a new cert for each connection you use), also you can query the user (sasl status) and network status (network status) and make the bouncer connect to the network again (network update). Anything that the bouncer does not connecting will reflect in the network status of the actual connection so when you type /whois username, you will what connection you have to the actual network like TLS status, registered user, hostname cloak and so on.

In the rare case when the IRC client does not support setting an ident string, you cannot set the target networkname at all, then you still can connect to multiple networks and use the different messages and channels, however the channels and users will be prefixed by the networkname so that you get everything in a single client connection. The only IRC client I have observed this behaviour is ReflectionIRC on Android, there is no known way to configure the bouncer connection correctly (if anybody knows one, please let me know)