💾 Archived View for low-key.me › guides › weechat_irc_relay.gmi captured on 2023-04-19 at 22:38:07. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-17)
-=-=-=-=-=-=-
While attempting to connect to the WeeChat relay I'd set up on my VPS, I learnt a couple of things. The first was that WeeChat itself couldn't act as a client to connect to a WeeChat relay, as odd as that sounds. There's an open issue regarding this on WeeChat's GitHub but it's been an open issue for over five years now.
Issue #369 on WeeChat's GitHub
The second thing I learnt was that WeeChat did offer an alternative option to connect to a remote instance of WeeChat in the form of the IRC proxy. While there are detailed guides for connecting to a WeeChat relay, I couldn't find any as comprehensive for the IRC proxy method.
Guide to setting up a WeeChat relay and connecting to it
What follows is my attempt at providing one.
On the WeeChat running on your server, use the following commands to setup the proxy.
/relay add ssl.irc 8081
In the above example I've used port 8081 but feel free to use whatever port you want. Just remember to allow the port through your firewall.
To setup a password for this,
/secure set relay YOUR_PASSWORD_HERE /set relay.network.password "${sec.data.relay}"
In order to connect via SSL, you'll need to generate a self-signed certificate. Weechat checks the following directory by default for your certificate:
~/.weechat/ssl
So let's create it in case it doesn't already exist and also generate the certificate.
mkdir -p ~/.weechat/ssl && cd ~/.weechat/ssl openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem
That's all the setting up you need to do on the server side of things.
You'll now be connecting to your relay by doing the following.
/secure set relay YOUR_PASSWORD_HERE /server add <name-of-your-connection> <your-server-ip-address-or-hostname>/8081 -ssl
Make sure that the password you enter here is the same as the one you set on the server.
To connect to a network on the relay, you'll need to set the password for the network we just created in the following format.
/set irc.server.<name-of-your-connection>.password "<name-of-network-on-server:${sec.data.relay}"
Now you can connect to it by running
/connect <name-of-your-connection>
If you want to autconnect then all you need to do is
/set irc.server.<name-of-your-connection>.autoconnect on
You might have issues with TLS as you're using a self-signed certificate. You can get around this by doing
/set irc.server.<name-of-your-connection>.ssl_verify off
Hope this was of some use to you.
--
CC0 low-key