A WeeChat relay client built with React Native using Expo. Heavily inspired by weechat-android.
Binary packages are distrubited via TestFlight for iOS users. Join the beta test group here: https://testflight.apple.com/join/0jFsQpot.
Binary packages for Android are attached to GitHub releases.
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>
Select WeeChat in the relay protocol drop down in settings.
/relay add api 9000
/set relay.network.password <your secret password>
Select API in the relay protocol drop down in settings.
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 {
# ...
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
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 $connection_upgrade;
proxy_read_timeout 604800;
proxy_set_header X-Real-IP $remote_addr;
}
}
}
Set the port as appropriate for the relay configuration in WeeChat. The above location directive is compatible with the WeeChat API protocol REST API, in addition to WebSockets.
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.
The default relay path is /weechat. The hostname may include a port number. For example, if you have exposed the WeeChat WebSocket at https://example.com/~user/weechat, enter example.com as the hostname, set the path to /~user/weechat, 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
npm install
# LaStartunch Expo
npm startThe app can then be run on a device or in a simulator with npx expo run:ios or npx expo run:android.