- Notifications
You must be signed in to change notification settings - Fork37
A web server/client for Quassel
License
magne4000/quassel-webserver
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A web client for Quassel (requires a running quasselcore)
❗ Your node version should be at least v16 (v20 recommended).To install node last version, you can installnvm.
With git:
git clone https://github.com/magne4000/quassel-webserver.gitcd quassel-webservernpm install --productionWith snap:
in any of thesupported Linux distributions:(Note that this is not yet stable)
snap install quassel-webserver --candidate
On NixOS:
There is a NixOS module available in NixOS 17.03 and above. Just add these lines to your /etc/nixos/configuration.nix
services.quassel-webserver={enable=true;};
For more configuration options in NixOS check outman configuration.nix.
Get the code and install the server with:
git clone https://github.com/magne4000/quassel-webserver.gitcd quassel-webservernpm installUpdate the server with:
git pull&& npm prune&& npm update
and run the following command:node app.js
The server is now running.
It is recommended to copy settings.cjs file to a new settings-user.cjs file
cp settings.cjs settings-user.cjsFilesettings-user.cjs can then be modified to specify default quasselcorehost andport.
All available settings are described insettings.cjs file.
You must use your own certificate for https mode. The key file is located at ssl/key.pem, and the certificate ssl/cert.pem.
You can generate a new self signed certificate with the following command:
openssl req -x509 -newkey rsa:2048 -keyout ssl/key.pem -out ssl/cert.pem -nodes Usage: app [options] Options: -h, --help output usage information -V, --version output the version number -c, --config <value> Path to configuration file -s, --socket <path> listen on local socket. If this option is set, --listen, --port and --mode are ignored -l, --listen <value> listening address [0.0.0.0] -p, --port <value> http(s) port to use [64080|64443] -m, --mode <value> http mode (http|https) [https]Startup scripts are available inscripts directory.
# SysVinitcp scripts/startup /etc/init.d/quasselweb# systemdcp scripts/quassel-webserver.service /lib/systemd/system/quassel-webserver.serviceFor the sysvinit script, be sure to changeBASEDIR,RUNASUSER andRUNASGROUP vars.
For the systemd script, you must customizeExecStart,User andGroup to suit your needs.
Just go tohttps://your.tld:64443 and enter your quasselcore information and credentials.
If you want to access quassel-webserver behind a reverse proxy, here are some tips.
You can launch quassel-webserver in local socket mode by adding-s <path/to/qws.run> to the command line. The specified path must point to a non-existent file, as it will be created by the application.
You can launch quassel-webserver in http mode by adding-m http to the command line.This tells the webserver to run inhttp mode, and to listen on port64080.
This way you can let yourapache ornginx server handle the SSL layer.
Reverse proxy onhttps://your.tld/quassel
If you run behind/quassel location on your webserver, do not forget to editsettings-user.cjs file
...prefixpath: '/quassel',...
Also, be sure to launch quassel-webserver in http mode by adding-m http to the command line, optionally including-l localhost to block direct outside connections from bypassing the proxy server.You can also start quassel-webserver in socket mode by instead specifying-s <path/to/qws.run>.
upstream quassel{serverhttp://127.0.0.1:64080 # or for socket, uncomment following line, and comment previous line # server unix:/path/to/qws.run;}# rewrite ^[/]quassel$ /quassel/ permanent;location /quassel{proxy_passhttp://quassel/quassel;proxy_set_header Upgrade$http_upgrade;proxy_set_header Connection"upgrade";proxy_http_version 1.1;proxy_set_header X-Real-IP$remote_addr;proxy_set_header X-Forwarded-For$proxy_add_x_forwarded_for;proxy_set_header Host$host;proxy_redirect off;}
You will need mod_proxy_wstunnel and mod_rewrite.
To proxy to a server over TCP:
<VirtualHost...>...RewriteEngineonRewriteCond%{HTTP:Connection}Upgrade [NC]RewriteCond%{HTTP:Upgrade}websocket [NC]RewriteRule/quassel/(.*)ws://127.0.0.1:64080/quassel/$1 [P,L]ProxyPass /quassel http://127.0.0.1:64080/quassel...</VirtualHost>
or to proxy to a unix domain socket:
<VirtualHost...>RewriteEngineOn <Location/quassel>RewriteCond%{HTTP:UPGRADE}^WebSocket$ [NC]RewriteCond%{HTTP:CONNECTION}Upgrade$ [NC]RewriteRule.*unix:///var/run/quasselweb.socket|ws://localhost/quassel/$1 [P,L,NE]ProxyPass unix:///var/run/quasselweb.socket|http://localhost/quassel </Location></VirtualHost>
(Note that you need the [NE] flag to prevent the "|" from being escaped)
This is aknown issue but there is a workaround:
- go to the
General Configurationand checkTrim buffer when switching to another buffer. This is also configurable insettings-user.cjsfile (seesettings.cjs)
It means that quassel-webserver has been killed prematurely. You just have to manually delete<path/to/qws.run> file.
#quassel-webserver on Freenode
Copyright (c) 2019 Joël Charles
Licensed under the MIT license.
About
A web server/client for Quassel
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.

