@lordbex/thelounge 4.4.3-blowfish
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.thelounge_home +1 -0
- package/LICENSE +22 -0
- package/README.md +95 -0
- package/client/index.html.tpl +69 -0
- package/dist/defaults/config.js +465 -0
- package/dist/package.json +174 -0
- package/dist/server/client.js +678 -0
- package/dist/server/clientManager.js +220 -0
- package/dist/server/command-line/index.js +85 -0
- package/dist/server/command-line/install.js +123 -0
- package/dist/server/command-line/outdated.js +30 -0
- package/dist/server/command-line/start.js +34 -0
- package/dist/server/command-line/storage.js +103 -0
- package/dist/server/command-line/uninstall.js +40 -0
- package/dist/server/command-line/upgrade.js +64 -0
- package/dist/server/command-line/users/add.js +67 -0
- package/dist/server/command-line/users/edit.js +39 -0
- package/dist/server/command-line/users/index.js +17 -0
- package/dist/server/command-line/users/list.js +53 -0
- package/dist/server/command-line/users/remove.js +37 -0
- package/dist/server/command-line/users/reset.js +64 -0
- package/dist/server/command-line/utils.js +177 -0
- package/dist/server/config.js +138 -0
- package/dist/server/helper.js +161 -0
- package/dist/server/identification.js +139 -0
- package/dist/server/index.js +3 -0
- package/dist/server/log.js +35 -0
- package/dist/server/models/chan.js +275 -0
- package/dist/server/models/msg.js +92 -0
- package/dist/server/models/network.js +546 -0
- package/dist/server/models/prefix.js +31 -0
- package/dist/server/models/user.js +42 -0
- package/dist/server/plugins/auth/ldap.js +188 -0
- package/dist/server/plugins/auth/local.js +41 -0
- package/dist/server/plugins/auth.js +70 -0
- package/dist/server/plugins/changelog.js +103 -0
- package/dist/server/plugins/clientCertificate.js +115 -0
- package/dist/server/plugins/dev-server.js +33 -0
- package/dist/server/plugins/inputs/action.js +54 -0
- package/dist/server/plugins/inputs/away.js +20 -0
- package/dist/server/plugins/inputs/ban.js +45 -0
- package/dist/server/plugins/inputs/blow.js +44 -0
- package/dist/server/plugins/inputs/connect.js +41 -0
- package/dist/server/plugins/inputs/ctcp.js +29 -0
- package/dist/server/plugins/inputs/disconnect.js +15 -0
- package/dist/server/plugins/inputs/ignore.js +74 -0
- package/dist/server/plugins/inputs/ignorelist.js +50 -0
- package/dist/server/plugins/inputs/index.js +105 -0
- package/dist/server/plugins/inputs/invite.js +31 -0
- package/dist/server/plugins/inputs/kick.js +26 -0
- package/dist/server/plugins/inputs/kill.js +13 -0
- package/dist/server/plugins/inputs/list.js +12 -0
- package/dist/server/plugins/inputs/mode.js +55 -0
- package/dist/server/plugins/inputs/msg.js +106 -0
- package/dist/server/plugins/inputs/mute.js +56 -0
- package/dist/server/plugins/inputs/nick.js +55 -0
- package/dist/server/plugins/inputs/notice.js +42 -0
- package/dist/server/plugins/inputs/part.js +46 -0
- package/dist/server/plugins/inputs/quit.js +27 -0
- package/dist/server/plugins/inputs/raw.js +13 -0
- package/dist/server/plugins/inputs/rejoin.js +25 -0
- package/dist/server/plugins/inputs/topic.js +24 -0
- package/dist/server/plugins/inputs/whois.js +19 -0
- package/dist/server/plugins/irc-events/away.js +59 -0
- package/dist/server/plugins/irc-events/cap.js +62 -0
- package/dist/server/plugins/irc-events/chghost.js +29 -0
- package/dist/server/plugins/irc-events/connection.js +152 -0
- package/dist/server/plugins/irc-events/ctcp.js +72 -0
- package/dist/server/plugins/irc-events/error.js +80 -0
- package/dist/server/plugins/irc-events/help.js +21 -0
- package/dist/server/plugins/irc-events/info.js +21 -0
- package/dist/server/plugins/irc-events/invite.js +27 -0
- package/dist/server/plugins/irc-events/join.js +53 -0
- package/dist/server/plugins/irc-events/kick.js +39 -0
- package/dist/server/plugins/irc-events/link.js +442 -0
- package/dist/server/plugins/irc-events/list.js +47 -0
- package/dist/server/plugins/irc-events/message.js +187 -0
- package/dist/server/plugins/irc-events/mode.js +124 -0
- package/dist/server/plugins/irc-events/modelist.js +67 -0
- package/dist/server/plugins/irc-events/motd.js +29 -0
- package/dist/server/plugins/irc-events/names.js +21 -0
- package/dist/server/plugins/irc-events/nick.js +45 -0
- package/dist/server/plugins/irc-events/part.js +35 -0
- package/dist/server/plugins/irc-events/quit.js +32 -0
- package/dist/server/plugins/irc-events/sasl.js +26 -0
- package/dist/server/plugins/irc-events/topic.js +42 -0
- package/dist/server/plugins/irc-events/unhandled.js +31 -0
- package/dist/server/plugins/irc-events/welcome.js +22 -0
- package/dist/server/plugins/irc-events/whois.js +57 -0
- package/dist/server/plugins/messageStorage/sqlite.js +454 -0
- package/dist/server/plugins/messageStorage/text.js +124 -0
- package/dist/server/plugins/packages/index.js +200 -0
- package/dist/server/plugins/packages/publicClient.js +66 -0
- package/dist/server/plugins/packages/themes.js +61 -0
- package/dist/server/plugins/storage.js +88 -0
- package/dist/server/plugins/sts.js +85 -0
- package/dist/server/plugins/uploader.js +267 -0
- package/dist/server/plugins/webpush.js +99 -0
- package/dist/server/server.js +857 -0
- package/dist/server/storageCleaner.js +131 -0
- package/dist/server/utils/fish.js +432 -0
- package/dist/shared/irc.js +19 -0
- package/dist/shared/linkify.js +81 -0
- package/dist/shared/types/chan.js +22 -0
- package/dist/shared/types/changelog.js +2 -0
- package/dist/shared/types/config.js +2 -0
- package/dist/shared/types/mention.js +2 -0
- package/dist/shared/types/msg.js +34 -0
- package/dist/shared/types/network.js +2 -0
- package/dist/shared/types/storage.js +2 -0
- package/dist/shared/types/user.js +2 -0
- package/dist/webpack.config.js +224 -0
- package/index.js +38 -0
- package/package.json +174 -0
- package/public/audio/pop.wav +0 -0
- package/public/css/style.css +12 -0
- package/public/css/style.css.map +1 -0
- package/public/favicon.ico +0 -0
- package/public/fonts/fa-solid-900.woff +0 -0
- package/public/fonts/fa-solid-900.woff2 +0 -0
- package/public/img/favicon-alerted.ico +0 -0
- package/public/img/icon-alerted-black-transparent-bg-72x72px.png +0 -0
- package/public/img/icon-alerted-grey-bg-192x192px.png +0 -0
- package/public/img/icon-black-transparent-bg.svg +1 -0
- package/public/img/logo-grey-bg-120x120px.png +0 -0
- package/public/img/logo-grey-bg-152x152px.png +0 -0
- package/public/img/logo-grey-bg-167x167px.png +0 -0
- package/public/img/logo-grey-bg-180x180px.png +0 -0
- package/public/img/logo-grey-bg-192x192px.png +0 -0
- package/public/img/logo-grey-bg-512x512px.png +0 -0
- package/public/img/logo-grey-bg.svg +1 -0
- package/public/img/logo-horizontal-transparent-bg-inverted.svg +1 -0
- package/public/img/logo-horizontal-transparent-bg.svg +1 -0
- package/public/img/logo-transparent-bg-inverted.svg +1 -0
- package/public/img/logo-transparent-bg.svg +1 -0
- package/public/img/logo-vertical-transparent-bg-inverted.svg +1 -0
- package/public/img/logo-vertical-transparent-bg.svg +1 -0
- package/public/js/bundle.js +2 -0
- package/public/js/bundle.js.map +1 -0
- package/public/js/bundle.vendor.js +3 -0
- package/public/js/bundle.vendor.js.LICENSE.txt +18 -0
- package/public/js/bundle.vendor.js.map +1 -0
- package/public/js/loading-error-handlers.js +1 -0
- package/public/robots.txt +2 -0
- package/public/service-worker.js +1 -0
- package/public/thelounge.webmanifest +53 -0
- package/public/themes/default.css +35 -0
- package/public/themes/morning.css +183 -0
package/.thelounge_home
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
~/.thelounge
|
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016 All contributors to The Lounge
|
|
4
|
+
Copyright (c) 2014 Mattias Erming and contributors, as part of Shout.
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in
|
|
14
|
+
all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
22
|
+
THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<h1 align="center">
|
|
2
|
+
<img
|
|
3
|
+
width="300"
|
|
4
|
+
alt="The Lounge"
|
|
5
|
+
src="https://raw.githubusercontent.com/thelounge/thelounge/master/client/img/logo-vertical-transparent-bg.svg?sanitize=true">
|
|
6
|
+
</h1>
|
|
7
|
+
|
|
8
|
+
<h3 align="center">
|
|
9
|
+
Modern web IRC client designed for self-hosting
|
|
10
|
+
</h3>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<strong>
|
|
14
|
+
<a href="https://thelounge.chat/">Website</a>
|
|
15
|
+
•
|
|
16
|
+
<a href="https://thelounge.chat/docs">Docs</a>
|
|
17
|
+
•
|
|
18
|
+
<a href="https://demo.thelounge.chat/">Demo</a>
|
|
19
|
+
•
|
|
20
|
+
<a href="https://github.com/thelounge/thelounge-docker">Docker</a>
|
|
21
|
+
</strong>
|
|
22
|
+
</p>
|
|
23
|
+
<p align="center">
|
|
24
|
+
<a href="https://demo.thelounge.chat/"><img
|
|
25
|
+
alt="#thelounge IRC channel on Libera.Chat"
|
|
26
|
+
src="https://img.shields.io/badge/Libera.Chat-%23thelounge-415364.svg?colorA=ff9e18"></a>
|
|
27
|
+
<a href="https://yarn.pm/thelounge"><img
|
|
28
|
+
alt="npm version"
|
|
29
|
+
src="https://img.shields.io/npm/v/thelounge.svg?colorA=333a41&maxAge=3600"></a>
|
|
30
|
+
<a href="https://github.com/thelounge/thelounge/actions"><img
|
|
31
|
+
alt="Build Status"
|
|
32
|
+
src="https://github.com/thelounge/thelounge/workflows/Build/badge.svg"></a>
|
|
33
|
+
</p>
|
|
34
|
+
|
|
35
|
+
<p align="center">
|
|
36
|
+
<img src="https://raw.githubusercontent.com/thelounge/thelounge.github.io/master/img/thelounge-screenshot.png" width="550">
|
|
37
|
+
</p>
|
|
38
|
+
|
|
39
|
+
## Overview
|
|
40
|
+
|
|
41
|
+
- **Modern features brought to IRC.** Push notifications, link previews, new message markers, and more bring IRC to the 21st century.
|
|
42
|
+
- **Always connected.** Remains connected to IRC servers while you are offline.
|
|
43
|
+
- **Cross platform.** It doesn't matter what OS you use, it just works wherever Node.js runs.
|
|
44
|
+
- **Responsive interface.** The client works smoothly on every desktop, smartphone and tablet.
|
|
45
|
+
- **Synchronized experience.** Always resume where you left off no matter what device.
|
|
46
|
+
|
|
47
|
+
To learn more about configuration, usage and features of The Lounge, take a look at [the website](https://thelounge.chat).
|
|
48
|
+
|
|
49
|
+
The Lounge is the official and community-managed fork of [Shout](https://github.com/erming/shout), by [Mattias Erming](https://github.com/erming).
|
|
50
|
+
|
|
51
|
+
## Installation and usage
|
|
52
|
+
|
|
53
|
+
The Lounge requires latest [Node.js](https://nodejs.org/) LTS version or more recent.
|
|
54
|
+
The [Yarn package manager](https://yarnpkg.com/) is also recommended.
|
|
55
|
+
If you want to install with npm, `--unsafe-perm` is required for a correct install.
|
|
56
|
+
|
|
57
|
+
### Running stable releases
|
|
58
|
+
|
|
59
|
+
Please refer to the [install and upgrade documentation on our website](https://thelounge.chat/docs/install-and-upgrade) for all available installation methods.
|
|
60
|
+
|
|
61
|
+
### Running from source
|
|
62
|
+
|
|
63
|
+
The following commands install and run the development version of The Lounge:
|
|
64
|
+
|
|
65
|
+
```sh
|
|
66
|
+
git clone https://github.com/thelounge/thelounge.git
|
|
67
|
+
cd thelounge
|
|
68
|
+
yarn install
|
|
69
|
+
NODE_ENV=production yarn build
|
|
70
|
+
yarn start
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
When installed like this, `thelounge` executable is not created. Use `node index <command>` to run commands.
|
|
74
|
+
|
|
75
|
+
⚠️ While it is the most recent codebase, this is not production-ready! Run at
|
|
76
|
+
your own risk. It is also not recommended to run this as root.
|
|
77
|
+
|
|
78
|
+
## Development setup
|
|
79
|
+
|
|
80
|
+
Simply follow the instructions to run The Lounge from source above, on your own
|
|
81
|
+
fork.
|
|
82
|
+
|
|
83
|
+
Before submitting any change, make sure to:
|
|
84
|
+
|
|
85
|
+
- Read the [Contributing instructions](https://github.com/thelounge/thelounge/blob/master/.github/CONTRIBUTING.md#contributing)
|
|
86
|
+
- Run `yarn test` to execute linters and the test suite
|
|
87
|
+
- Run `yarn format:prettier` if linting fails
|
|
88
|
+
- Run `yarn build:client` if you change or add anything in `client/js` or `client/components`
|
|
89
|
+
- The built files will be output to `public/` by webpack
|
|
90
|
+
- Run `yarn build:server` if you change anything in `server/`
|
|
91
|
+
- The built files will be output to `dist/` by tsc
|
|
92
|
+
- `yarn dev` can be used to start The Lounge with hot module reloading
|
|
93
|
+
|
|
94
|
+
To ensure that you don't commit files that fail the linting, you can install a pre-commit git hook.
|
|
95
|
+
Execute `yarn githooks-install` to do so.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, user-scalable=no">
|
|
7
|
+
|
|
8
|
+
<link rel="preload" as="script" href="js/loading-error-handlers.js?v=<%- cacheBust %>">
|
|
9
|
+
<link rel="preload" as="script" href="js/bundle.vendor.js?v=<%- cacheBust %>">
|
|
10
|
+
<link rel="preload" as="script" href="js/bundle.js?v=<%- cacheBust %>">
|
|
11
|
+
|
|
12
|
+
<link rel="stylesheet" href="css/style.css?v=<%- cacheBust %>">
|
|
13
|
+
<link id="theme" rel="stylesheet" href="themes/<%- theme %>.css" data-server-theme="<%- theme %>">
|
|
14
|
+
<% _.forEach(stylesheets, function(css) { %>
|
|
15
|
+
<link rel="stylesheet" href="packages/<%- css %>">
|
|
16
|
+
<% }); %>
|
|
17
|
+
<style id="user-specified-css"></style>
|
|
18
|
+
|
|
19
|
+
<title>The Lounge</title>
|
|
20
|
+
|
|
21
|
+
<!-- Browser tab icon -->
|
|
22
|
+
<link id="favicon" rel="icon" sizes="16x16 32x32 64x64" href="favicon.ico" data-other="img/favicon-alerted.ico" type="image/x-icon">
|
|
23
|
+
|
|
24
|
+
<!-- Safari pinned tab icon -->
|
|
25
|
+
<link rel="mask-icon" href="img/icon-black-transparent-bg.svg" color="#415364">
|
|
26
|
+
|
|
27
|
+
<link rel="manifest" href="thelounge.webmanifest">
|
|
28
|
+
|
|
29
|
+
<!-- iPhone 4, iPhone 4s, iPhone 5, iPhone 5c, iPhone 5s, iPhone 6, iPhone 6s, iPhone 7, iPhone 7s, iPhone8 -->
|
|
30
|
+
<link rel="apple-touch-icon" sizes="120x120" href="img/logo-grey-bg-120x120px.png">
|
|
31
|
+
<!-- iPad and iPad mini @2x -->
|
|
32
|
+
<link rel="apple-touch-icon" sizes="152x152" href="img/logo-grey-bg-152x152px.png">
|
|
33
|
+
<!-- iPad Pro -->
|
|
34
|
+
<link rel="apple-touch-icon" sizes="167x167" href="img/logo-grey-bg-167x167px.png">
|
|
35
|
+
<!-- iPhone X, iPhone 8 Plus, iPhone 7 Plus, iPhone 6s Plus, iPhone 6 Plus -->
|
|
36
|
+
<link rel="apple-touch-icon" sizes="180x180" href="img/logo-grey-bg-180x180px.png">
|
|
37
|
+
|
|
38
|
+
<!-- Windows 8/10 - Edge tiles -->
|
|
39
|
+
<meta name="application-name" content="The Lounge">
|
|
40
|
+
<meta name="msapplication-TileColor" content="<%- themeColor %>">
|
|
41
|
+
<meta name="msapplication-square70x70logo" content="img/logo-grey-bg-120x120px.png">
|
|
42
|
+
<meta name="msapplication-square150x150logo" content="img/logo-grey-bg-152x152px.png">
|
|
43
|
+
|
|
44
|
+
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
45
|
+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
46
|
+
<meta name="mobile-web-app-capable" content="yes">
|
|
47
|
+
<meta name="theme-color" content="<%- themeColor %>">
|
|
48
|
+
|
|
49
|
+
</head>
|
|
50
|
+
<body class="<%- public ? " public" : "" %>" data-transports="<%- JSON.stringify(transports) %>">
|
|
51
|
+
<div id="app"></div>
|
|
52
|
+
<div id="loading">
|
|
53
|
+
<div class="window">
|
|
54
|
+
<div id="loading-status-container">
|
|
55
|
+
<img src="img/logo-vertical-transparent-bg.svg" class="logo" alt="" width="256" height="170">
|
|
56
|
+
<img src="img/logo-vertical-transparent-bg-inverted.svg" class="logo-inverted" alt="" width="256" height="170">
|
|
57
|
+
<p id="loading-page-message">The Lounge requires a modern browser with JavaScript enabled.</p>
|
|
58
|
+
</div>
|
|
59
|
+
<div id="loading-reload-container">
|
|
60
|
+
<p id="loading-slow">This is taking longer than it should, there might be connectivity issues.</p>
|
|
61
|
+
<button id="loading-reload" class="btn">Reload page</button>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
<script src="js/loading-error-handlers.js?v=<%- cacheBust %>"></script>
|
|
66
|
+
<script src="js/bundle.vendor.js?v=<%- cacheBust %>"></script>
|
|
67
|
+
<script src="js/bundle.js?v=<%- cacheBust %>"></script>
|
|
68
|
+
</body>
|
|
69
|
+
</html>
|
|
@@ -0,0 +1,465 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = {
|
|
3
|
+
// ## Server settings
|
|
4
|
+
// ### `public`
|
|
5
|
+
//
|
|
6
|
+
// When set to `true`, The Lounge starts in public mode. When set to `false`,
|
|
7
|
+
// it starts in private mode.
|
|
8
|
+
//
|
|
9
|
+
// - A **public server** does not require authentication. Anyone can connect
|
|
10
|
+
// to IRC networks in this mode. All IRC connections and channel
|
|
11
|
+
// scrollbacks are lost when a user leaves the client.
|
|
12
|
+
// - A **private server** requires users to log in. Their IRC connections are
|
|
13
|
+
// kept even when they are not using or logged in to the client. All joined
|
|
14
|
+
// channels and scrollbacks are available when they come back.
|
|
15
|
+
//
|
|
16
|
+
// This value is set to `false` by default.
|
|
17
|
+
public: false,
|
|
18
|
+
// ### `host`
|
|
19
|
+
//
|
|
20
|
+
// IP address or hostname for the web server to listen to. For example, set it
|
|
21
|
+
// to `"127.0.0.1"` to accept connections from localhost only.
|
|
22
|
+
//
|
|
23
|
+
// For UNIX domain sockets, use `"unix:/absolute/path/to/file.sock"`.
|
|
24
|
+
//
|
|
25
|
+
// This value is set to `undefined` by default to listen on all interfaces.
|
|
26
|
+
host: undefined,
|
|
27
|
+
// ### `port`
|
|
28
|
+
//
|
|
29
|
+
// Set the port to listen to.
|
|
30
|
+
//
|
|
31
|
+
// This value is set to `9000` by default.
|
|
32
|
+
port: 9000,
|
|
33
|
+
// ### `bind`
|
|
34
|
+
//
|
|
35
|
+
// Set the local IP to bind to for outgoing connections.
|
|
36
|
+
//
|
|
37
|
+
// This value is set to `undefined` by default to let the operating system
|
|
38
|
+
// pick its preferred one.
|
|
39
|
+
bind: undefined,
|
|
40
|
+
// ### `reverseProxy`
|
|
41
|
+
//
|
|
42
|
+
// When set to `true`, The Lounge is marked as served behind a reverse proxy
|
|
43
|
+
// and will honor the `X-Forwarded-For` header.
|
|
44
|
+
//
|
|
45
|
+
// This value is set to `false` by default.
|
|
46
|
+
reverseProxy: false,
|
|
47
|
+
// ### `maxHistory`
|
|
48
|
+
//
|
|
49
|
+
// Defines the maximum number of history lines that will be kept in memory per
|
|
50
|
+
// channel/query, in order to reduce the memory usage of the server. Setting
|
|
51
|
+
// this to `-1` will keep unlimited amount.
|
|
52
|
+
//
|
|
53
|
+
// This value is set to `10000` by default.
|
|
54
|
+
maxHistory: 10000,
|
|
55
|
+
// ### `https`
|
|
56
|
+
//
|
|
57
|
+
// These settings are used to run The Lounge's web server using encrypted TLS.
|
|
58
|
+
//
|
|
59
|
+
// If you want more control over the webserver,
|
|
60
|
+
// [use a reverse proxy instead](https://thelounge.chat/docs/guides/reverse-proxies).
|
|
61
|
+
//
|
|
62
|
+
// The available keys for the `https` object are:
|
|
63
|
+
//
|
|
64
|
+
// - `enable`: when set to `false`, HTTPS support is disabled
|
|
65
|
+
// and all other values are ignored.
|
|
66
|
+
// - `key`: Path to the private key file.
|
|
67
|
+
// - `certificate`: Path to the certificate.
|
|
68
|
+
// - `ca`: Path to the CA bundle.
|
|
69
|
+
//
|
|
70
|
+
// The value of `enable` is set to `false` to disable HTTPS by default, in
|
|
71
|
+
// which case the other two string settings are ignored.
|
|
72
|
+
https: {
|
|
73
|
+
enable: false,
|
|
74
|
+
key: "",
|
|
75
|
+
certificate: "",
|
|
76
|
+
ca: "",
|
|
77
|
+
},
|
|
78
|
+
// ## Client settings
|
|
79
|
+
// ### `theme`
|
|
80
|
+
//
|
|
81
|
+
// Set the default theme to serve to new users. They will be able to select a
|
|
82
|
+
// different one in their client settings among those available.
|
|
83
|
+
//
|
|
84
|
+
// The Lounge ships with two themes (`default` and `morning`) and can be
|
|
85
|
+
// extended by installing more themes. Read more about how to manage them
|
|
86
|
+
// [here](https://thelounge.chat/docs/guides/theme-creation).
|
|
87
|
+
//
|
|
88
|
+
// This value needs to be the package name and not the display name. For
|
|
89
|
+
// example, the value for Morning would be `morning`, and the value for
|
|
90
|
+
// Solarized would be `thelounge-theme-solarized`.
|
|
91
|
+
//
|
|
92
|
+
// This value is set to `"default"` by default.
|
|
93
|
+
theme: "default",
|
|
94
|
+
// ### `prefetch`
|
|
95
|
+
//
|
|
96
|
+
// When set to `true`, The Lounge will load thumbnails and site descriptions
|
|
97
|
+
// from URLs posted in channels and private messages.
|
|
98
|
+
//
|
|
99
|
+
// This value is set to `false` by default.
|
|
100
|
+
prefetch: false,
|
|
101
|
+
// ### `disableMediaPreview`
|
|
102
|
+
//
|
|
103
|
+
// When set to `true`, The Lounge will not preview media (images, video and
|
|
104
|
+
// audio) hosted on third-party sites. This ensures the client does not
|
|
105
|
+
// make any requests to external sites. If `prefetchStorage` is enabled,
|
|
106
|
+
// images proxied via the The Lounge will be previewed.
|
|
107
|
+
//
|
|
108
|
+
// This has no effect if `prefetch` is set to `false`.
|
|
109
|
+
//
|
|
110
|
+
// This value is set to `false` by default.
|
|
111
|
+
disableMediaPreview: false,
|
|
112
|
+
// ### `prefetchStorage`
|
|
113
|
+
// When set to `true`, The Lounge will store and proxy prefetched images and
|
|
114
|
+
// thumbnails on the filesystem rather than directly display the content at
|
|
115
|
+
// the original URLs.
|
|
116
|
+
//
|
|
117
|
+
// This option primarily exists to resolve mixed content warnings by not
|
|
118
|
+
// loading images from http hosts. This option does not work for video
|
|
119
|
+
// or audio as The Lounge will only load these from https hosts.
|
|
120
|
+
//
|
|
121
|
+
// If storage is enabled, The Lounge will fetch and store images and thumbnails
|
|
122
|
+
// in the `${THELOUNGE_HOME}/storage` folder.
|
|
123
|
+
//
|
|
124
|
+
// Images are deleted when they are no longer referenced by any message
|
|
125
|
+
// (controlled by `maxHistory`), and the folder is cleaned up when The Lounge
|
|
126
|
+
// restarts.
|
|
127
|
+
//
|
|
128
|
+
// This value is set to `false` by default.
|
|
129
|
+
prefetchStorage: false,
|
|
130
|
+
// ### `prefetchMaxImageSize`
|
|
131
|
+
//
|
|
132
|
+
// When `prefetch` is enabled, images will only be displayed if their file
|
|
133
|
+
// size does not exceed this limit.
|
|
134
|
+
//
|
|
135
|
+
// This value is set to `2048` kilobytes by default.
|
|
136
|
+
prefetchMaxImageSize: 2048,
|
|
137
|
+
// ### prefetchMaxSearchSize
|
|
138
|
+
//
|
|
139
|
+
// This value sets the maximum response size allowed when finding the Open
|
|
140
|
+
// Graph tags for link previews. The entire response is temporarily stored
|
|
141
|
+
// in memory and for some sites like YouTube this can easily exceed 300
|
|
142
|
+
// kilobytes.
|
|
143
|
+
//
|
|
144
|
+
// This value is set to `50` kilobytes by default.
|
|
145
|
+
prefetchMaxSearchSize: 50,
|
|
146
|
+
// ### `prefetchTimeout`
|
|
147
|
+
//
|
|
148
|
+
// When `prefetch` is enabled, this value sets the number of milliseconds
|
|
149
|
+
// before The Lounge gives up attempting to fetch a link. This can be useful
|
|
150
|
+
// if you've increased the `prefetchMaxImageSize`.
|
|
151
|
+
//
|
|
152
|
+
// Take caution, however, that an inordinately large value may lead to
|
|
153
|
+
// performance issues or even a denial of service, since The Lounge will not
|
|
154
|
+
// be able to clean up outgoing connections as quickly. Usually the default
|
|
155
|
+
// value is appropriate, so only change it if necessary.
|
|
156
|
+
//
|
|
157
|
+
// This value is set to `5000` milliseconds by default.
|
|
158
|
+
prefetchTimeout: 5000,
|
|
159
|
+
// ### `fileUpload`
|
|
160
|
+
//
|
|
161
|
+
// Allow uploading files to the server hosting The Lounge.
|
|
162
|
+
//
|
|
163
|
+
// Files are stored in the `${THELOUNGE_HOME}/uploads` folder, do not expire,
|
|
164
|
+
// and are not removed by The Lounge. This may cause issues depending on your
|
|
165
|
+
// hardware, for example in terms of disk usage.
|
|
166
|
+
//
|
|
167
|
+
// The available keys for the `fileUpload` object are:
|
|
168
|
+
//
|
|
169
|
+
// - `enable`: When set to `true`, files can be uploaded on the client with a
|
|
170
|
+
// drag-and-drop or using the upload dialog.
|
|
171
|
+
// - `maxFileSize`: When file upload is enabled, users sending files above
|
|
172
|
+
// this limit will be prompted with an error message in their browser. A value of
|
|
173
|
+
// `-1` disables the file size limit and allows files of any size. **Use at
|
|
174
|
+
// your own risk.** This value is set to `10240` kilobytes by default.
|
|
175
|
+
// - `baseUrl`: If you want to change the URL where uploaded files are accessed,
|
|
176
|
+
// you can set this option to `"https://example.com/folder/"` and the final URL
|
|
177
|
+
// would look like `"https://example.com/folder/aabbccddeeff1234/name.png"`.
|
|
178
|
+
// If you use this option, you must have a reverse proxy configured,
|
|
179
|
+
// to correctly proxy the uploads URLs back to The Lounge.
|
|
180
|
+
// This value is set to `null` by default.
|
|
181
|
+
fileUpload: {
|
|
182
|
+
enable: false,
|
|
183
|
+
maxFileSize: 10240,
|
|
184
|
+
baseUrl: null,
|
|
185
|
+
},
|
|
186
|
+
// ### `transports`
|
|
187
|
+
//
|
|
188
|
+
// Set `socket.io` transports.
|
|
189
|
+
//
|
|
190
|
+
// This value is set to `["polling", "websocket"]` by default.
|
|
191
|
+
transports: ["polling", "websocket"],
|
|
192
|
+
// ### `leaveMessage`
|
|
193
|
+
//
|
|
194
|
+
// Set users' default `quit` and `part` messages if they are not providing
|
|
195
|
+
// one.
|
|
196
|
+
//
|
|
197
|
+
// This value is set to `"The Lounge - https://thelounge.chat"` by
|
|
198
|
+
// default.
|
|
199
|
+
leaveMessage: "The Lounge - https://thelounge.chat",
|
|
200
|
+
// ## Default network
|
|
201
|
+
// ### `defaults`
|
|
202
|
+
//
|
|
203
|
+
// Specifies default network information that will be used as placeholder
|
|
204
|
+
// values in the *Connect* window.
|
|
205
|
+
//
|
|
206
|
+
// The available keys for the `defaults` object are:
|
|
207
|
+
//
|
|
208
|
+
// - `name`: Name to display in the channel list of The Lounge. This value is
|
|
209
|
+
// not forwarded to the IRC network.
|
|
210
|
+
// - `host`: IP address or hostname of the IRC server.
|
|
211
|
+
// - `port`: Usually 6667 for unencrypted connections and 6697 for
|
|
212
|
+
// connections encrypted with TLS.
|
|
213
|
+
// - `password`: Connection password. If the server supports SASL capability,
|
|
214
|
+
// then this password will be used in SASL authentication.
|
|
215
|
+
// - `tls`: Enable TLS connections
|
|
216
|
+
// - `rejectUnauthorized`: Whether the server certificate should be verified
|
|
217
|
+
// against the list of supplied Certificate Authorities (CAs) by your
|
|
218
|
+
// Node.js installation.
|
|
219
|
+
// - `nick`: Nick name. Percent signs (`%`) will be replaced by random
|
|
220
|
+
// numbers from 0 to 9. For example, `Guest%%%` may become `Guest123`.
|
|
221
|
+
// - `username`: User name.
|
|
222
|
+
// - `realname`: Real name displayed by some clients. Defaults to the nick if set to ""
|
|
223
|
+
// - `leaveMessage`: Network specific leave message (overrides global leaveMessage)
|
|
224
|
+
// - `join`: Comma-separated list of channels to auto-join once connected.
|
|
225
|
+
//
|
|
226
|
+
// This value is set to connect to the official channel of The Lounge on
|
|
227
|
+
// Libera.Chat by default:
|
|
228
|
+
//
|
|
229
|
+
// ```js
|
|
230
|
+
// defaults: {
|
|
231
|
+
// name: "Libera.Chat",
|
|
232
|
+
// host: "irc.libera.chat",
|
|
233
|
+
// port: 6697,
|
|
234
|
+
// password: "",
|
|
235
|
+
// tls: true,
|
|
236
|
+
// rejectUnauthorized: true,
|
|
237
|
+
// nick: "thelounge%%",
|
|
238
|
+
// username: "thelounge",
|
|
239
|
+
// realname: "The Lounge User",
|
|
240
|
+
// join: "#thelounge"
|
|
241
|
+
// }
|
|
242
|
+
// ```
|
|
243
|
+
defaults: {
|
|
244
|
+
name: "Libera.Chat",
|
|
245
|
+
host: "irc.libera.chat",
|
|
246
|
+
port: 6697,
|
|
247
|
+
password: "",
|
|
248
|
+
tls: true,
|
|
249
|
+
rejectUnauthorized: true,
|
|
250
|
+
nick: "thelounge%%",
|
|
251
|
+
username: "thelounge",
|
|
252
|
+
realname: "",
|
|
253
|
+
join: "#thelounge",
|
|
254
|
+
leaveMessage: "",
|
|
255
|
+
},
|
|
256
|
+
// ### `lockNetwork`
|
|
257
|
+
//
|
|
258
|
+
// When set to `true`, users will not be able to modify host, port and TLS
|
|
259
|
+
// settings and will be limited to the configured network.
|
|
260
|
+
// These fields will also be hidden from the UI.
|
|
261
|
+
//
|
|
262
|
+
// This value is set to `false` by default.
|
|
263
|
+
lockNetwork: false,
|
|
264
|
+
// ## User management
|
|
265
|
+
// ### `messageStorage`
|
|
266
|
+
// The Lounge can log user messages, for example to access them later or to
|
|
267
|
+
// reload messages on server restart.
|
|
268
|
+
// Set this array with one or multiple values to enable logging:
|
|
269
|
+
// - `text`: Messages per network and channel will be stored as text files.
|
|
270
|
+
// **Messages will not be reloaded on restart.**
|
|
271
|
+
// - `sqlite`: Messages are stored in SQLite database files, one per user.
|
|
272
|
+
//
|
|
273
|
+
// Logging can be disabled globally by setting this value to an empty array
|
|
274
|
+
// `[]`. Logging is also controlled per user individually in the `log` key of
|
|
275
|
+
// their JSON configuration file.
|
|
276
|
+
//
|
|
277
|
+
// This value is set to `["sqlite", "text"]` by default.
|
|
278
|
+
messageStorage: ["sqlite", "text"],
|
|
279
|
+
// ### `storagePolicy`
|
|
280
|
+
// When the sqlite storage is in use, control the maximum storage duration.
|
|
281
|
+
// A background task will periodically clean up messages older than the limit.
|
|
282
|
+
// The available keys for the `storagePolicy` object are:
|
|
283
|
+
//
|
|
284
|
+
// - `enabled`: If this is false, the cleaning task is not running.
|
|
285
|
+
// - `maxAgeDays`: Maximum age of an entry in days.
|
|
286
|
+
// - `deletionPolicy`: Controls what types of messages are being deleted.
|
|
287
|
+
// Valid options are:
|
|
288
|
+
// - `statusOnly`: Only delete message types which are status related (e.g. away, back, join, parts, mode, ctcp...)
|
|
289
|
+
// but keep actual messages from nicks. This keeps the DB size down while retaining "precious" messages.
|
|
290
|
+
// - `everything`: Delete everything, including messages from irc nicks
|
|
291
|
+
storagePolicy: {
|
|
292
|
+
enabled: false,
|
|
293
|
+
maxAgeDays: 7,
|
|
294
|
+
deletionPolicy: "statusOnly",
|
|
295
|
+
},
|
|
296
|
+
// ### `useHexIp`
|
|
297
|
+
//
|
|
298
|
+
// When set to `true`, users' IP addresses will be encoded as hex.
|
|
299
|
+
//
|
|
300
|
+
// This is done to share the real user IP address with the server for host
|
|
301
|
+
// masking purposes. This is encoded in the `username` field and only supports
|
|
302
|
+
// IPv4.
|
|
303
|
+
//
|
|
304
|
+
// This value is set to `false` by default.
|
|
305
|
+
useHexIp: false,
|
|
306
|
+
// ## WEBIRC support
|
|
307
|
+
//
|
|
308
|
+
// When enabled, The Lounge will pass the connecting user's host and IP to the
|
|
309
|
+
// IRC server. Note that this requires to obtain a password from the IRC
|
|
310
|
+
// network that The Lounge will be connecting to and generally involves a lot
|
|
311
|
+
// of trust from the network you are connecting to.
|
|
312
|
+
//
|
|
313
|
+
// There are 2 ways to configure the `webirc` setting:
|
|
314
|
+
//
|
|
315
|
+
// - **Basic**: an object where keys are IRC hosts and values are passwords.
|
|
316
|
+
// For example:
|
|
317
|
+
//
|
|
318
|
+
// ```json
|
|
319
|
+
// webirc: {
|
|
320
|
+
// "irc.example.net": "thisiswebircpassword1",
|
|
321
|
+
// "irc.example.org": "thisiswebircpassword2",
|
|
322
|
+
// },
|
|
323
|
+
// ```
|
|
324
|
+
//
|
|
325
|
+
// - **Advanced**: an object where keys are IRC hosts and values are functions
|
|
326
|
+
// that take two arguments (`webircObj`, `network`) and return an
|
|
327
|
+
// object to be directly passed to `irc-framework`. `webircObj` contains the
|
|
328
|
+
// generated object which you can modify. For example:
|
|
329
|
+
//
|
|
330
|
+
// ```js
|
|
331
|
+
// webirc: {
|
|
332
|
+
// "irc.example.com": (webircObj, network) => {
|
|
333
|
+
// webircObj.password = "thisiswebircpassword";
|
|
334
|
+
// webircObj.hostname = `webirc/${webircObj.hostname}`;
|
|
335
|
+
// return webircObj;
|
|
336
|
+
// },
|
|
337
|
+
// },
|
|
338
|
+
// ```
|
|
339
|
+
//
|
|
340
|
+
// This value is set to `null` to disable WEBIRC by default.
|
|
341
|
+
webirc: null,
|
|
342
|
+
// ## identd and oidentd support
|
|
343
|
+
// ### `identd`
|
|
344
|
+
//
|
|
345
|
+
// Run The Lounge with `identd` support.
|
|
346
|
+
//
|
|
347
|
+
// The available keys for the `identd` object are:
|
|
348
|
+
//
|
|
349
|
+
// - `enable`: When `true`, the identd daemon runs on server start.
|
|
350
|
+
// - `port`: Port to listen for ident requests.
|
|
351
|
+
//
|
|
352
|
+
// The value of `enable` is set to `false` to disable `identd` support by
|
|
353
|
+
// default, in which case the value of `port` is ignored. The default value of
|
|
354
|
+
// `port` is 113.
|
|
355
|
+
identd: {
|
|
356
|
+
enable: false,
|
|
357
|
+
port: 113,
|
|
358
|
+
},
|
|
359
|
+
// ### `oidentd`
|
|
360
|
+
//
|
|
361
|
+
// When this setting is a string, this enables `oidentd` support using the
|
|
362
|
+
// configuration file located at the given path.
|
|
363
|
+
//
|
|
364
|
+
// This is set to `null` by default to disable `oidentd` support.
|
|
365
|
+
oidentd: null,
|
|
366
|
+
// ## LDAP support
|
|
367
|
+
// These settings enable and configure LDAP authentication.
|
|
368
|
+
//
|
|
369
|
+
// They are only being used in private mode. To know more about private mode,
|
|
370
|
+
// see the `public` setting above.
|
|
371
|
+
//
|
|
372
|
+
// The authentication process works as follows:
|
|
373
|
+
//
|
|
374
|
+
// 1. The Lounge connects to the LDAP server with its system credentials.
|
|
375
|
+
// 2. It performs an LDAP search query to find the full DN associated to the
|
|
376
|
+
// user requesting to log in.
|
|
377
|
+
// 3. The Lounge tries to connect a second time, but this time using the
|
|
378
|
+
// user's DN and password. Authentication is validated if and only if this
|
|
379
|
+
// connection is successful.
|
|
380
|
+
//
|
|
381
|
+
// The search query takes a couple of parameters in `searchDN`:
|
|
382
|
+
//
|
|
383
|
+
// - a base DN `searchDN/base`. Only children nodes of this DN will likely
|
|
384
|
+
// be returned;
|
|
385
|
+
// - a search scope `searchDN/scope` (see LDAP documentation);
|
|
386
|
+
// - the query itself, built as `(&(<primaryKey>=<username>) <filter>)`
|
|
387
|
+
// where `<username>` is the user name provided in the log in request,
|
|
388
|
+
// `<primaryKey>` is provided by the config and `<filter>` is a filtering
|
|
389
|
+
// complement also given in the config, to filter for instance only for
|
|
390
|
+
// nodes of type `inetOrgPerson`, or whatever LDAP search allows.
|
|
391
|
+
//
|
|
392
|
+
// Alternatively, you can specify the `bindDN` parameter. This will make The
|
|
393
|
+
// Lounge ignore `searchDN` options and assume that the user DN is always
|
|
394
|
+
// `<bindDN>,<primaryKey>=<username>`, where `<username>` is the user name
|
|
395
|
+
// provided in the log in request, and `<bindDN>` and `<primaryKey>` are
|
|
396
|
+
// provided by the configuration.
|
|
397
|
+
//
|
|
398
|
+
// The available keys for the `ldap` object are:
|
|
399
|
+
ldap: {
|
|
400
|
+
// - `enable`: when set to `false`, LDAP support is disabled and all other
|
|
401
|
+
// values are ignored.
|
|
402
|
+
enable: false,
|
|
403
|
+
// - `url`: A url of the form `ldaps://<ip>:<port>`.
|
|
404
|
+
// For plain connections, use the `ldap` scheme.
|
|
405
|
+
url: "ldaps://example.com",
|
|
406
|
+
// - `tlsOptions`: LDAP connection TLS options (only used if scheme is
|
|
407
|
+
// `ldaps://`). It is an object whose values are Node.js' `tls.connect()`
|
|
408
|
+
// options. It is set to `{}` by default.
|
|
409
|
+
// For example, this option can be used in order to force the use of IPv6:
|
|
410
|
+
// ```js
|
|
411
|
+
// {
|
|
412
|
+
// host: 'my::ip::v6',
|
|
413
|
+
// servername: 'example.com'
|
|
414
|
+
// }
|
|
415
|
+
// ```
|
|
416
|
+
tlsOptions: {},
|
|
417
|
+
// - `primaryKey`: LDAP primary key. It is set to `"uid"` by default.
|
|
418
|
+
primaryKey: "uid",
|
|
419
|
+
// - `baseDN`: LDAP base DN, alternative to `searchDN`. For example, set it
|
|
420
|
+
// to `"ou=accounts,dc=example,dc=com"`.
|
|
421
|
+
// When unset, the LDAP auth logic with use `searchDN` instead to locate users.
|
|
422
|
+
// - `searchDN`: LDAP search DN settings. This defines the procedure by
|
|
423
|
+
// which The Lounge first looks for the user DN before authenticating them.
|
|
424
|
+
// It is ignored if `baseDN` is specified. It is an object with the
|
|
425
|
+
// following keys:
|
|
426
|
+
searchDN: {
|
|
427
|
+
// - `rootDN`: This bind DN is used to query the server for the DN of
|
|
428
|
+
// the user. This is supposed to be a system user that has access in
|
|
429
|
+
// read-only to the DNs of the people that are allowed to log in.
|
|
430
|
+
// It is set to `"cn=thelounge,ou=system-users,dc=example,dc=com"` by
|
|
431
|
+
// default.
|
|
432
|
+
rootDN: "cn=thelounge,ou=system-users,dc=example,dc=com",
|
|
433
|
+
// - `rootPassword`: Password of The Lounge LDAP system user.
|
|
434
|
+
rootPassword: "1234",
|
|
435
|
+
// - `filter`: it is set to `"(&(objectClass=person)(memberOf=ou=accounts,dc=example,dc=com))"`
|
|
436
|
+
// by default.
|
|
437
|
+
filter: "(&(objectClass=person)(memberOf=ou=accounts,dc=example,dc=com))",
|
|
438
|
+
// - `base`: LDAP search base (search only within this node). It is set
|
|
439
|
+
// to `"dc=example,dc=com"` by default.
|
|
440
|
+
base: "dc=example,dc=com",
|
|
441
|
+
// - `scope`: LDAP search scope. It is set to `"sub"` by default.
|
|
442
|
+
scope: "sub",
|
|
443
|
+
},
|
|
444
|
+
},
|
|
445
|
+
// ## Debugging settings
|
|
446
|
+
// The `debug` object contains several settings to enable debugging in The
|
|
447
|
+
// Lounge. Use them to learn more about an issue you are noticing but be aware
|
|
448
|
+
// this may produce more logging or may affect connection performance so it is
|
|
449
|
+
// not recommended to use them by default.
|
|
450
|
+
//
|
|
451
|
+
// All values in the `debug` object are set to `false`.
|
|
452
|
+
debug: {
|
|
453
|
+
// ### `debug.ircFramework`
|
|
454
|
+
//
|
|
455
|
+
// When set to true, this enables extra debugging output provided by
|
|
456
|
+
// [`irc-framework`](https://github.com/kiwiirc/irc-framework), the
|
|
457
|
+
// underlying IRC library for Node.js used by The Lounge.
|
|
458
|
+
ircFramework: false,
|
|
459
|
+
// ### `debug.raw`
|
|
460
|
+
//
|
|
461
|
+
// When set to `true`, this enables logging of raw IRC messages into each
|
|
462
|
+
// server window, displayed on the client.
|
|
463
|
+
raw: false,
|
|
464
|
+
},
|
|
465
|
+
};
|