2016-11-24 11:44:51 +01:00
|
|
|
"use strict";
|
|
|
|
|
2015-08-22 20:24:46 +02:00
|
|
|
module.exports = {
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
|
|
|
// Set the server mode.
|
|
|
|
// Public servers does not require authentication.
|
|
|
|
//
|
|
|
|
// Set to 'false' to enable users.
|
|
|
|
//
|
|
|
|
// @type boolean
|
2018-05-01 12:25:53 +02:00
|
|
|
// @default false
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
|
|
|
public: false,
|
|
|
|
|
|
|
|
//
|
|
|
|
// IP address or hostname for the web server to listen on.
|
|
|
|
// Setting this to undefined will listen on all interfaces.
|
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
// For UNIX domain sockets, use unix:/absolute/path/to/file.sock.
|
|
|
|
//
|
2016-11-24 11:44:51 +01:00
|
|
|
// @type string
|
|
|
|
// @default undefined
|
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
host: undefined,
|
2016-11-24 11:44:51 +01:00
|
|
|
|
|
|
|
//
|
|
|
|
// Set the port to listen on.
|
|
|
|
//
|
|
|
|
// @type int
|
|
|
|
// @default 9000
|
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
port: 9009,
|
2016-11-24 11:44:51 +01:00
|
|
|
|
|
|
|
//
|
|
|
|
// Set the local IP to bind to for outgoing connections. Leave to undefined
|
|
|
|
// to let the operating system pick its preferred one.
|
|
|
|
//
|
|
|
|
// @type string
|
|
|
|
// @default undefined
|
|
|
|
//
|
|
|
|
bind: undefined,
|
|
|
|
|
|
|
|
//
|
|
|
|
// Sets whether the server is behind a reverse proxy and should honor the
|
|
|
|
// X-Forwarded-For header or not.
|
|
|
|
//
|
|
|
|
// @type boolean
|
|
|
|
// @default false
|
|
|
|
//
|
|
|
|
reverseProxy: true,
|
|
|
|
|
|
|
|
//
|
|
|
|
// Set the default theme.
|
2018-05-01 12:25:53 +02:00
|
|
|
// Find out how to add new themes at https://thelounge.github.io/docs/plugins/themes.html
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
|
|
|
// @type string
|
2018-05-01 12:25:53 +02:00
|
|
|
// @default "example"
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
theme: "example",
|
2016-11-24 11:44:51 +01:00
|
|
|
|
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
// Prefetch URLs
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
// If enabled, The Lounge will try to load thumbnails and site descriptions from
|
|
|
|
// URLs posted in channels.
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
|
|
|
// @type boolean
|
2018-05-01 12:25:53 +02:00
|
|
|
// @default false
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
prefetch: false,
|
2016-11-24 11:44:51 +01:00
|
|
|
|
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
// Store and proxy prefetched images and thumbnails.
|
|
|
|
// This improves security and privacy by not exposing client IP address,
|
|
|
|
// and always loading images from The Lounge instance and making all assets secure,
|
|
|
|
// which in result fixes mixed content warnings.
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
// If storage is enabled, The Lounge will fetch and store images and thumbnails
|
|
|
|
// in the `${THELOUNGE_HOME}/storage` folder.
|
|
|
|
//
|
|
|
|
// Images are deleted when they are no longer referenced by any message (controlled by maxHistory),
|
|
|
|
// and the folder is cleaned up on every The Lounge restart.
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
|
|
|
// @type boolean
|
|
|
|
// @default false
|
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
prefetchStorage: false,
|
2016-11-24 11:44:51 +01:00
|
|
|
|
|
|
|
//
|
|
|
|
// Prefetch URLs Image Preview size limit
|
|
|
|
//
|
|
|
|
// If prefetch is enabled, The Lounge will only display content under the maximum size.
|
2018-05-01 12:25:53 +02:00
|
|
|
// Specified value is in kilobytes. Default value is 2048 kilobytes.
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
|
|
|
// @type int
|
2018-05-01 12:25:53 +02:00
|
|
|
// @default 2048
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
prefetchMaxImageSize: 2048,
|
2016-11-24 11:44:51 +01:00
|
|
|
|
|
|
|
//
|
|
|
|
// Display network
|
|
|
|
//
|
|
|
|
// If set to false network settings will not be shown in the login form.
|
|
|
|
//
|
|
|
|
// @type boolean
|
|
|
|
// @default true
|
|
|
|
//
|
|
|
|
displayNetwork: true,
|
|
|
|
|
|
|
|
//
|
|
|
|
// Lock network
|
|
|
|
//
|
|
|
|
// If set to true, users will not be able to modify host, port and tls
|
|
|
|
// settings and will be limited to the configured network.
|
|
|
|
//
|
|
|
|
// @type boolean
|
|
|
|
// @default false
|
|
|
|
//
|
|
|
|
lockNetwork: false,
|
|
|
|
|
2018-05-01 12:25:53 +02:00
|
|
|
//
|
|
|
|
// Hex IP
|
|
|
|
//
|
|
|
|
// If enabled, clients' username will be set to their IP encoded has hex.
|
|
|
|
// This is done to share the real user IP address with the server for host masking purposes.
|
|
|
|
//
|
|
|
|
// @type boolean
|
|
|
|
// @default false
|
|
|
|
//
|
|
|
|
useHexIp: false,
|
|
|
|
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
|
|
|
// WEBIRC support
|
|
|
|
//
|
|
|
|
// If enabled, The Lounge will pass the connecting user's host and IP to the
|
|
|
|
// IRC server. Note that this requires to obtain a password from the IRC network
|
|
|
|
// The Lounge will be connecting to and generally involves a lot of trust from the
|
|
|
|
// network you are connecting to.
|
|
|
|
//
|
|
|
|
// Format (standard): {"irc.example.net": "hunter1", "irc.example.org": "passw0rd"}
|
|
|
|
// Format (function):
|
|
|
|
// {"irc.example.net": function(client, args, trusted) {
|
|
|
|
// // here, we return a webirc object fed directly to `irc-framework`
|
|
|
|
// return {username: "thelounge", password: "hunter1", address: args.ip, hostname: "webirc/"+args.hostname};
|
|
|
|
// }}
|
|
|
|
//
|
|
|
|
// @type string | function(client, args):object(webirc)
|
|
|
|
// @default null
|
|
|
|
webirc: null,
|
|
|
|
|
2018-05-01 12:25:53 +02:00
|
|
|
//
|
|
|
|
// Message logging
|
|
|
|
// Logging is also controlled per user individually (logs variable)
|
|
|
|
// Leave the array empty to disable all logging globally
|
|
|
|
//
|
|
|
|
// text: Text file per network/channel in user folder
|
|
|
|
// sqlite: Messages are stored in SQLite, this allows them to be reloaded on server restart
|
|
|
|
//
|
|
|
|
// @type array
|
|
|
|
// @default ["sqlite", "text"]
|
|
|
|
//
|
2019-02-23 11:06:32 +01:00
|
|
|
messageStorage: ["sqlite"],
|
2018-05-01 12:25:53 +02:00
|
|
|
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
|
|
|
// Log settings
|
|
|
|
//
|
|
|
|
// Logging has to be enabled per user. If enabled, logs will be stored in
|
|
|
|
// the 'logs/<user>/<network>/' folder.
|
|
|
|
//
|
|
|
|
// @type object
|
|
|
|
// @default {}
|
|
|
|
//
|
|
|
|
logs: {
|
|
|
|
//
|
|
|
|
// Timestamp format
|
|
|
|
//
|
|
|
|
// @type string
|
|
|
|
// @default "YYYY-MM-DD HH:mm:ss"
|
|
|
|
//
|
|
|
|
format: "YYYY-MM-DD HH:mm:ss",
|
|
|
|
|
|
|
|
//
|
|
|
|
// Timezone
|
|
|
|
//
|
|
|
|
// @type string
|
|
|
|
// @default "UTC+00:00"
|
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
timezone: "UTC+00:00",
|
2016-11-24 11:44:51 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
//
|
|
|
|
// Maximum number of history lines per channel
|
|
|
|
//
|
|
|
|
// Defines the maximum number of history lines that will be kept in
|
|
|
|
// memory per channel/query, in order to reduce the memory usage of
|
2018-05-01 12:25:53 +02:00
|
|
|
// the server. Setting this to -1 will keep unlimited amount.
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
|
|
|
// @type integer
|
2018-05-01 12:25:53 +02:00
|
|
|
// @default 10000
|
|
|
|
maxHistory: 10000,
|
2016-11-24 11:44:51 +01:00
|
|
|
|
|
|
|
//
|
|
|
|
// Default values for the 'Connect' form.
|
|
|
|
//
|
|
|
|
// @type object
|
|
|
|
// @default {}
|
|
|
|
//
|
|
|
|
defaults: {
|
|
|
|
//
|
|
|
|
// Name
|
|
|
|
//
|
|
|
|
// @type string
|
|
|
|
// @default "Freenode"
|
|
|
|
//
|
|
|
|
name: "Freenode",
|
|
|
|
|
|
|
|
//
|
|
|
|
// Host
|
|
|
|
//
|
|
|
|
// @type string
|
|
|
|
// @default "chat.freenode.net"
|
|
|
|
//
|
|
|
|
host: "chat.freenode.net",
|
|
|
|
|
|
|
|
//
|
|
|
|
// Port
|
|
|
|
//
|
|
|
|
// @type int
|
|
|
|
// @default 6697
|
|
|
|
//
|
|
|
|
port: 6697,
|
|
|
|
|
|
|
|
//
|
|
|
|
// Password
|
|
|
|
//
|
|
|
|
// @type string
|
|
|
|
// @default ""
|
|
|
|
//
|
|
|
|
password: "",
|
|
|
|
|
|
|
|
//
|
|
|
|
// Enable TLS/SSL
|
|
|
|
//
|
|
|
|
// @type boolean
|
|
|
|
// @default true
|
|
|
|
//
|
|
|
|
tls: true,
|
|
|
|
|
2018-05-01 12:25:53 +02:00
|
|
|
//
|
|
|
|
// Enable certificate verification
|
|
|
|
//
|
|
|
|
// If true, the server certificate is verified against
|
|
|
|
// the list of supplied CAs by your node.js installation.
|
|
|
|
//
|
|
|
|
// @type boolean
|
|
|
|
// @default true
|
|
|
|
//
|
|
|
|
rejectUnauthorized: true,
|
|
|
|
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
|
|
|
// Nick
|
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
// Percent sign (%) will be replaced into a random number from 0 to 9.
|
|
|
|
// For example, Guest%%% will become Guest123 on page load.
|
|
|
|
//
|
2016-11-24 11:44:51 +01:00
|
|
|
// @type string
|
2018-05-01 12:25:53 +02:00
|
|
|
// @default "thelounge%%"
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
nick: "thelounge%%",
|
2016-11-24 11:44:51 +01:00
|
|
|
|
|
|
|
//
|
|
|
|
// Username
|
|
|
|
//
|
|
|
|
// @type string
|
2018-05-01 12:25:53 +02:00
|
|
|
// @default "thelounge"
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
username: "thelounge",
|
2016-11-24 11:44:51 +01:00
|
|
|
|
|
|
|
//
|
|
|
|
// Real Name
|
|
|
|
//
|
|
|
|
// @type string
|
|
|
|
// @default "The Lounge User"
|
|
|
|
//
|
|
|
|
realname: "The Lounge User",
|
|
|
|
|
|
|
|
//
|
|
|
|
// Channels
|
|
|
|
// This is a comma-separated list.
|
|
|
|
//
|
|
|
|
// @type string
|
|
|
|
// @default "#thelounge"
|
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
join: "#thelounge",
|
2016-11-24 11:44:51 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
//
|
|
|
|
// Set socket.io transports
|
|
|
|
//
|
|
|
|
// @type array
|
|
|
|
// @default ["polling", "websocket"]
|
|
|
|
//
|
|
|
|
transports: ["polling", "websocket"],
|
|
|
|
|
|
|
|
//
|
|
|
|
// Run The Lounge using encrypted HTTP/2.
|
|
|
|
// This will fallback to regular HTTPS if HTTP/2 is not supported.
|
|
|
|
//
|
|
|
|
// @type object
|
|
|
|
// @default {}
|
|
|
|
//
|
|
|
|
https: {
|
|
|
|
//
|
|
|
|
// Enable HTTP/2 / HTTPS support.
|
|
|
|
//
|
|
|
|
// @type boolean
|
|
|
|
// @default false
|
|
|
|
//
|
|
|
|
enable: false,
|
|
|
|
|
|
|
|
//
|
|
|
|
// Path to the key.
|
|
|
|
//
|
|
|
|
// @type string
|
|
|
|
// @example "sslcert/key.pem"
|
|
|
|
// @default ""
|
|
|
|
//
|
|
|
|
key: "",
|
|
|
|
|
|
|
|
//
|
|
|
|
// Path to the certificate.
|
|
|
|
//
|
|
|
|
// @type string
|
|
|
|
// @example "sslcert/key-cert.pem"
|
|
|
|
// @default ""
|
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
certificate: "",
|
|
|
|
|
|
|
|
//
|
|
|
|
// Path to the CA bundle.
|
|
|
|
//
|
|
|
|
// @type string
|
|
|
|
// @example "sslcert/bundle.pem"
|
|
|
|
// @default ""
|
|
|
|
//
|
|
|
|
ca: "",
|
2016-11-24 11:44:51 +01:00
|
|
|
},
|
|
|
|
|
2018-05-01 12:25:53 +02:00
|
|
|
//
|
|
|
|
// Default quit and part message if none is provided.
|
|
|
|
//
|
|
|
|
// @type string
|
|
|
|
// @default "The Lounge - https://thelounge.chat"
|
|
|
|
//
|
|
|
|
leaveMessage: "The Lounge - https://thelounge.chat",
|
|
|
|
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
|
|
|
// Run The Lounge with identd support.
|
|
|
|
//
|
|
|
|
// @type object
|
|
|
|
// @default {}
|
|
|
|
//
|
|
|
|
identd: {
|
|
|
|
//
|
|
|
|
// Run the identd daemon on server start.
|
|
|
|
//
|
|
|
|
// @type boolean
|
|
|
|
// @default false
|
|
|
|
//
|
|
|
|
enable: false,
|
|
|
|
|
|
|
|
//
|
|
|
|
// Port to listen for ident requests.
|
|
|
|
//
|
|
|
|
// @type int
|
|
|
|
// @default 113
|
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
port: 113,
|
2016-11-24 11:44:51 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
//
|
|
|
|
// Enable oidentd support using the specified file
|
|
|
|
//
|
|
|
|
// Example: oidentd: "~/.oidentd.conf",
|
|
|
|
//
|
|
|
|
// @type string
|
|
|
|
// @default null
|
|
|
|
//
|
|
|
|
oidentd: null,
|
|
|
|
|
|
|
|
//
|
|
|
|
// LDAP authentication settings (only available if public=false)
|
|
|
|
// @type object
|
|
|
|
// @default {}
|
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
// The authentication process works as follows:
|
|
|
|
//
|
|
|
|
// 1. Lounge connects to the LDAP server with its system credentials
|
|
|
|
// 2. It performs a LDAP search query to find the full DN associated to the
|
|
|
|
// user requesting to log in.
|
|
|
|
// 3. Lounge tries to connect a second time, but this time using the user's
|
|
|
|
// DN and password. Auth is validated iff this connection is successful.
|
|
|
|
//
|
|
|
|
// The search query takes a couple of parameters in `searchDN`:
|
|
|
|
// - a base DN `searchDN/base`. Only children nodes of this DN will be likely
|
|
|
|
// to be returned;
|
|
|
|
// - a search scope `searchDN/scope` (see LDAP documentation);
|
|
|
|
// - the query itself, build as (&(<primaryKey>=<username>) <filter>)
|
|
|
|
// where <username> is the user name provided in the log in request,
|
|
|
|
// <primaryKey> is provided by the config and <fitler> is a filtering complement
|
|
|
|
// also given in the config, to filter for instance only for nodes of type
|
|
|
|
// inetOrgPerson, or whatever LDAP search allows.
|
|
|
|
//
|
|
|
|
// Alternatively, you can specify the `bindDN` parameter. This will make the lounge
|
|
|
|
// ignore searchDN options and assume that the user DN is always:
|
|
|
|
// <bindDN>,<primaryKey>=<username>
|
|
|
|
// where <username> is the user name provided in the log in request, and <bindDN>
|
|
|
|
// and <primaryKey> are provided by the config.
|
|
|
|
//
|
2016-11-24 11:44:51 +01:00
|
|
|
ldap: {
|
|
|
|
//
|
|
|
|
// Enable LDAP user authentication
|
|
|
|
//
|
|
|
|
// @type boolean
|
|
|
|
// @default false
|
|
|
|
//
|
|
|
|
enable: true,
|
|
|
|
|
|
|
|
//
|
|
|
|
// LDAP server URL
|
|
|
|
//
|
|
|
|
// @type string
|
|
|
|
//
|
|
|
|
url: "ldap://127.0.0.1",
|
|
|
|
|
2018-05-01 12:25:53 +02:00
|
|
|
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
2018-05-01 12:25:53 +02:00
|
|
|
// LDAP base dn, alternative to searchDN
|
2016-11-24 11:44:51 +01:00
|
|
|
//
|
|
|
|
// @type string
|
|
|
|
//
|
|
|
|
baseDN: "ou=users,dc=yunohost,dc=org",
|
|
|
|
|
|
|
|
//
|
|
|
|
// LDAP primary key
|
|
|
|
//
|
|
|
|
// @type string
|
|
|
|
// @default "uid"
|
|
|
|
//
|
|
|
|
primaryKey: "uid"
|
|
|
|
|
2018-05-01 12:25:53 +02:00
|
|
|
}
|
2015-08-22 20:24:46 +02:00
|
|
|
};
|