A simple IRC web client
Find a file
Simon Ser e76e71c968 Fallback to first server buffer in Alt+a keybind
Previously we switched to the server buffer for the current network.
2021-05-31 13:24:23 +02:00
components Init App.config 2021-05-31 12:26:57 +02:00
lib Pretty-print MOTD 2021-05-28 10:50:42 +02:00
.editorconfig Add .editorconfig 2020-07-22 14:51:37 +02:00
.gitignore Add support for config file 2021-05-25 12:33:22 +02:00
commands.js Add /lusers command 2021-05-29 13:14:07 +02:00
index.html Set the viewport meta tag 2021-05-26 22:42:35 +02:00
keybindings.js Fallback to first server buffer in Alt+a keybind 2021-05-31 13:24:23 +02:00
LICENSE Initial commit 2020-04-24 19:03:43 +02:00
package-lock.json Update dependencies 2021-05-17 09:52:42 +02:00
package.json Update preact 2021-01-12 16:04:49 +01:00
README.md Implement optional opportunistic pings 2021-05-27 18:31:04 +02:00
state.js Fix typo in Unread.union 2021-05-27 22:35:41 +02:00
store.js Introduce store helper 2021-05-26 18:43:11 +02:00
style.css Ensure connect form has padding 2021-05-31 10:55:26 +02:00

gamja

A bare-bones IRC web client.

screenshot

Usage

Requires an IRC WebSocket server.

First install dependencies:

npm install --production

soju

Add a WebSocket listener to soju, e.g. listen wss://127.0.0.1:8080.

Configure your reverse proxy to serve gamja files and proxy /socket to soju.

webircgateway

Setup webircgateway to serve gamja files:

[fileserving]
enabled = true
webroot = /path/to/gamja

Then connect to webircgateway and append ?server=/webirc/websocket/ to the URL.

nginx

If you use nginx as a reverse HTTP proxy, make sure to bump the default read timeout to a value higher than the IRC server PING interval. Example:

location /socket {
	proxy_pass http://127.0.0.1:8080;
	proxy_read_timeout 600s;
	proxy_http_version 1.1;
	proxy_set_header Upgrade $http_upgrade;
	proxy_set_header Connection "Upgrade";
	proxy_set_header X-Forwarded-For $remote_addr;
	proxy_set_header X-Forwarded-Proto $scheme;
}

If you are unable to configure the proxy timeout accordingly, you can set the server.ping option in config.json to an interval, in seconds, between which gamja will send opportunistic pings.

Development server

Start your IRC WebSocket server, e.g. on port 8080. Then run:

npm install
npm start

This will start a development HTTP server for gamja. Connect to it and append ?server=ws://localhost:8080 to the URL.

Query parameters

gamja settings can be overridden using URL query parameters:

  • server: path or URL to the WebSocket server
  • nick: nickname
  • channels: comma-separated list of channels to join (# needs to be escaped)

Alternatively, the channels can be set with the URL fragment (ie, by just appending the channel name to the gamja URL).

Configuration file

gamja default settings can be set using a config.json file at the root:

{
	"server": {
		// WebSocket URL to connect to (string)
		"url": "wss://irc.example.org",
		// Channel(s) to auto-join (string or array of strings)
		"autojoin": "#gamja"
	}
}

Contributing

Send patches on the mailing list, report bugs on the issue tracker. Discuss in #soju on Libera Chat.

License

AGPLv3, see LICENSE.

Copyright (C) 2020 The gamja Contributors