A weechat relay client built with React Native using Expo. Heavily inspired by weechat-android.
![](https://private-user-images.githubusercontent.com/5330/314513705-337589c6-a029-4d6a-bc13-1924e2174c0f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzMTA5ODIsIm5iZiI6MTcyNDMxMDY4MiwicGF0aCI6Ii81MzMwLzMxNDUxMzcwNS0zMzc1ODljNi1hMDI5LTRkNmEtYmMxMy0xOTI0ZTIxNzRjMGYucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjJUMDcxMTIyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZjQ2NzVmMjI0ZTZmNGE5NzhjYWZkODc3MGMzZGY1MDdhODdjZWFmMTg0OWU1N2RlM2U5ZDcyMjEzNjI3MjE4NiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.IfBJpllE_wooL7a5geDNhHIntA5wu2dJEZf4tNUzqas)
![](https://private-user-images.githubusercontent.com/5330/314513830-510482bc-769e-4be2-bb97-ea4472e4e231.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzMTA5ODIsIm5iZiI6MTcyNDMxMDY4MiwicGF0aCI6Ii81MzMwLzMxNDUxMzgzMC01MTA0ODJiYy03NjllLTRiZTItYmI5Ny1lYTQ0NzJlNGUyMzEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgyMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MjJUMDcxMTIyWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZDlhNmM2OWJjYzE3Y2E4NzFlMjZjOGQwMGI2OWY3OGYzZGRkMWMyZDRhZDA4NmNkYjVjZTliMmI5ZTljZGIxZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.5-qarsk_aS-C9h2Al9PZWOs-Z_iw20V1ffAOP3iypgk)
Binary packages are distrubited via TestFlight for iOS users. Join the beta test group here: https://testflight.apple.com/join/0jFsQpot.
Binary packages are not built for Android. However, the project can be built locally and easily installed on a device.
All examples below uses example.com
as hostname, and 9001
as port number, but you should of course replace them with your own values as needed.
/relay add weechat 9001
/set relay.network.password <your secret password>
Note that WeechatRN requires the relay to be configured with the "weechat" protocol, not the "irc" protocol.
It is recommended to front the relay with a webserver to provide TLS termination. This can easily be done with nginx or other webservers.
Example nginx.conf
which exposes /weechat
on example.com
with TLS:
http {
# ...
server {
listen 443 ssl http2;
server_name example.com;
ssl_certificate cert.pem;
ssl_certificate_key cert.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location /weechat {
proxy_pass http://localhost:9001/weechat;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_read_timeout 604800;
proxy_set_header X-Real-IP $remote_addr;
}
}
}
Fill in the hostname and password fields with the appropriate values. Check the SSL box if weechat is fronted with a proxy that supports it or if a SSL relay is configured in weechat itself.
Note that /weechat
will be appended to the configured hostname. The path suffix is not configurable. However, the hostname may also contain a path. For example, if you have exposed the weechat WebSocket at https://example.com/~user/weechat
, simply enter example.com/~user
as the hostname, and check the SSL box. Do not include the scheme (https://
) in the hostname field.
Push notifications can be sent to WeechatRN for private messages and highlights with the use of a helper script.
To install the script, download weechatrn.py to weechat's python/autoload
directory. This directory may reside in ~/.weechat
or ~/.local/share/weechat
, depending on your setup.
Once downloaded, load the script via /python load weechatrn.py
.
On (re)connect, WeechatRN will store a token in weechat, which will be used to send push notifications to the device.
By default, push notifications will be sent for all highlights and private messages. You can disable notifications for the current buffer with /set plugins.var.python.WeechatRN.notify_current_buffer off
.
# Install dependencies for project
npm install
# Launch Expo
npm start
On your device, scan the QR code with the Camera app (iOS) or the Expo Client (Android).