Categorygithub.com/tulir/mauirc
modulepackage
2.0.1+incompatible
Repository: https://github.com/tulir/mauirc.git
Documentation: pkg.go.dev

# README

mauIRC

License GitHub release GitHub commits

A web-based UI-focused IRC client. Written in Go (GopherJS).

Setup

Packages

You can find the basic minified sources from the Release section.

Compiling

You can compile the code yourself using GopherJS. Once you have the Go toolkit, simply use go get -u github.com/gopherjs/gopherjs to get the GopherJS toolkit. Then get the mauIRC sources using go get -u maunium.net/go/mauirc and use make in the mauIRC source directory.

Minifying the GopherJS output is included in GopherJS itself, but HTML and CSS minification require other tools. The build scripts in mauIRC use the NPM packages clean-css and html-minifier. If you have the two packages installed, simply use make build-min to build a minified version. You can also use make package to generate a .tar.xz package with the necessary files.

Webserver setup

mauIRC only contains static files, but assumes that a mauIRC server is running the same domain. The easiest way to set this up is to have your webserver try to proxypass requests to the mauIRC server.

Here's a basic Nginx config:

server {
	listen			<ip>:80;

	location / {
		# mauIRC uses some Server-Side Includes
		ssi               on;
		ssi_silent_errors on;

		root              <path to mauIRC>;

		try_files         $uri $uri/ @mauircd;
	}

	location @mauircd {
		proxy_pass            http://<mauIRCd ip:port>;

		# Forward the actual IP of the client to the server.
		# Remember to configure the server to trust these headers.
		proxy_set_header      X-Forwarded-For $remote_addr;

		port_in_redirect      off;
		proxy_connect_timeout 300;

		# Forward the WebSocket upgrade headers.
		proxy_set_header      Upgrade    $http_upgrade;
		proxy_set_header      Connection $connection_upgrade;
	}
}

map $http_upgrade $connection_upgrade {
	default	upgrade;
	''	close;
}

# Packages

Package conn contains connection code.
Package data contains the session data storage system.
Package templates contains the template loader and applier.
Package ui contains UI-related functions.
Package util contains utilities.