WeeChat Relay

WeeChat is an amazing IRC client. It works really well on the terminal, but you might prefer a web interface or maybe you'd like to share your day with your IRC pals while you're not sitting in front of your computer. Here are a few alternative WeeChat interfaces that you can use:

WeeChat-Android
Glowing Bear
Lith

If you're new to WeeChat, no worries! This is a great tutorial to get started:

WeeChat Quickstart

If you like WeeChat, let's go ahead and configure it to allow alternative user interfaces.

Generate a self-signed certificate

To connect an interface to WeeChat, we want things to be encrypted to protect our passwords and messages from leaking and being intercepted. To do that, we first create a certificate.

# Create the directory
mkdir -p ~/.config/weechat/tls/

# Actually generate the cert and set it to expire in a year.
gencert -D 365 -d ~/.config/weechat/tls/ twentytwo.town

Copy the certificate into WeeChat

Now we combine both certificate and private key into one file called `relay.pem`. Also since this is a multi-user machine, we restrict the permissions to this folder.

# Concatenate and copy the certificate
cat ~/.config/weechat/tls/twentytwo.town.* > ~/.config/weechat/tls/relay.pem 

# Prevent others from reading it
chmod -R go-r ~/.config/weechat/tls/

Enable the relay in WeeChat

Now we configure WeeChat itself. Type the following into WeeChat to set a password and to read the relay.pem file that we just created.

/set relay.network.password y0ur_StRonG-pa$sw0rd:of*choice
/relay tlscertkey

Replace TLSPORT to a port that hasn't been used yet that's above 1024. Run `netstat | less` to see which ports are being used.

/relay add tls.weechat TLSPORT

Optional for using WeeChat-Android because recent versions of Android won't accept this certificate. So what we'll do is enable a plaintext connection to WeeChat, but it's then encrypted using SSH tunneling. Pick another port number for PLAINPORT that's above 1024.

/relay add weechat PLAINPORT 

Connect!

Glowing Bear

If you're using Glowing Bear, we have a self-hosted version of it actually!

We need to do a little work to get it working with a self-signed certificate. First, visit https://twentytwo.town:TLSPORT first to create an exception for our self-signed certificates, then visit Glowing Bear again and log in using twentytwo.town with the port TLSPORT that you chose and don't forget to select "Enable encryption."

Lith

When using Lith, simply enable "Allow self-signed certificates" in the settings then connect to twentytwo.town on the TLSPORT that you picked along with your WeeChat password.

WeeChat-Android

When using WeeChat-Android, connect using SSH tunneling in the app using your twentytwo.town username and key. After that, connect to twentytwo.town with the port TLSPORT you chose along with your WeeChat password.

Let me know if you're having trouble!

written by ~durian