Advertisement
Guest User

Untitled

a guest
Apr 12th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.29 KB | None | 0 0
  1. "use strict";
  2.  
  3. module.exports = {
  4. //
  5. // Set the server mode.
  6. // Public servers does not require authentication.
  7. //
  8. // Set to 'false' to enable users.
  9. //
  10. // @type boolean
  11. // @default false
  12. //
  13. public: true,
  14.  
  15. //
  16. // IP address or hostname for the web server to listen on.
  17. // Setting this to undefined will listen on all interfaces.
  18. //
  19. // For UNIX domain sockets, use unix:/absolute/path/to/file.sock.
  20. //
  21. // @type string
  22. // @default undefined
  23. //
  24. host: undefined,
  25.  
  26. //
  27. // Set the port to listen on.
  28. //
  29. // @type int
  30. // @default 9000
  31. //
  32. port: 9001,
  33.  
  34. //
  35. // Set the local IP to bind to for outgoing connections. Leave to undefined
  36. // to let the operating system pick its preferred one.
  37. //
  38. // @type string
  39. // @default undefined
  40. //
  41. bind: undefined,
  42.  
  43. //
  44. // Sets whether the server is behind a reverse proxy and should honor the
  45. // X-Forwarded-For header or not.
  46. //
  47. // @type boolean
  48. // @default false
  49. //
  50. reverseProxy: false,
  51.  
  52. //
  53. // Set the default theme.
  54. // Find out how to add new themes at https://thelounge.github.io/docs/plugins/themes.html
  55. //
  56. // @type string
  57. // @default "default"
  58. //
  59. theme: "default",
  60.  
  61. //
  62. // Prefetch URLs
  63. //
  64. // If enabled, The Lounge will try to load thumbnails and site descriptions from
  65. // URLs posted in channels.
  66. //
  67. // @type boolean
  68. // @default false
  69. //
  70. prefetch: false,
  71.  
  72. //
  73. // Store and proxy prefetched images and thumbnails.
  74. // This improves security and privacy by not exposing client IP address,
  75. // and always loading images from The Lounge instance and making all assets secure,
  76. // which in result fixes mixed content warnings.
  77. //
  78. // If storage is enabled, The Lounge will fetch and store images and thumbnails
  79. // in the `${THELOUNGE_HOME}/storage` folder.
  80. //
  81. // Images are deleted when they are no longer referenced by any message (controlled by maxHistory),
  82. // and the folder is cleaned up on every The Lounge restart.
  83. //
  84. // @type boolean
  85. // @default false
  86. //
  87. prefetchStorage: false,
  88.  
  89. //
  90. // Prefetch URLs Image Preview size limit
  91. //
  92. // If prefetch is enabled, The Lounge will only display content under the maximum size.
  93. // Specified value is in kilobytes. Default value is 2048 kilobytes.
  94. //
  95. // @type int
  96. // @default 2048
  97. //
  98. prefetchMaxImageSize: 2048,
  99.  
  100. //
  101. // Display network
  102. //
  103. // If set to false network settings will not be shown in the login form.
  104. //
  105. // @type boolean
  106. // @default true
  107. //
  108. displayNetwork: false,
  109.  
  110. //
  111. // Lock network
  112. //
  113. // If set to true, users will not be able to modify host, port and tls
  114. // settings and will be limited to the configured network.
  115. //
  116. // @type boolean
  117. // @default false
  118. //
  119. lockNetwork: true,
  120.  
  121. //
  122. // Hex IP
  123. //
  124. // If enabled, clients' username will be set to their IP encoded has hex.
  125. // This is done to share the real user IP address with the server for host masking purposes.
  126. //
  127. // @type boolean
  128. // @default false
  129. //
  130. useHexIp: false,
  131.  
  132. //
  133. // WEBIRC support
  134. //
  135. // If enabled, The Lounge will pass the connecting user's host and IP to the
  136. // IRC server. Note that this requires to obtain a password from the IRC network
  137. // The Lounge will be connecting to and generally involves a lot of trust from the
  138. // network you are connecting to.
  139. //
  140. // Format (standard): {"irc.example.net": "hunter1", "irc.example.org": "passw0rd"}
  141. // Format (function):
  142. // {"irc.example.net": function(client, args, trusted) {
  143. // // here, we return a webirc object fed directly to `irc-framework`
  144. // return {username: "thelounge", password: "hunter1", address: args.ip, hostname: "webirc/"+args.hostname};
  145. // }}
  146. //
  147. // @type string | function(client, args):object(webirc)
  148. // @default null
  149. webirc: null,
  150.  
  151. //
  152. // Message logging
  153. // Logging is also controlled per user individually (logs variable)
  154. // Leave the array empty to disable all logging globally
  155. //
  156. // text: Text file per network/channel in user folder
  157. // sqlite: Messages are stored in SQLite, this allows them to be reloaded on server restart
  158. //
  159. // @type array
  160. // @default ["sqlite", "text"]
  161. //
  162. messageStorage: ["sqlite", "text"],
  163.  
  164. //
  165. // Maximum number of history lines per channel
  166. //
  167. // Defines the maximum number of history lines that will be kept in
  168. // memory per channel/query, in order to reduce the memory usage of
  169. // the server. Setting this to -1 will keep unlimited amount.
  170. //
  171. // @type integer
  172. // @default 10000
  173. maxHistory: 10000,
  174.  
  175. //
  176. // Default values for the 'Connect' form.
  177. //
  178. // @type object
  179. // @default {}
  180. //
  181. defaults: {
  182. //
  183. // Name
  184. //
  185. // @type string
  186. // @default "Freenode"
  187. //
  188. name: "WeakNet",
  189.  
  190. //
  191. // Host
  192. //
  193. // @type string
  194. // @default "chat.freenode.net"
  195. //
  196. host: "irc.weaknet.eu",
  197.  
  198. //
  199. // Port
  200. //
  201. // @type int
  202. // @default 6697
  203. //
  204. port: 6667,
  205.  
  206. //
  207. // Password
  208. //
  209. // @type string
  210. // @default ""
  211. //
  212. password: "",
  213.  
  214. //
  215. // Enable TLS/SSL
  216. //
  217. // @type boolean
  218. // @default true
  219. //
  220. tls: false,
  221.  
  222. //
  223. // Enable certificate verification
  224. //
  225. // If true, the server certificate is verified against
  226. // the list of supplied CAs by your node.js installation.
  227. //
  228. // @type boolean
  229. // @default true
  230. //
  231. rejectUnauthorized: true,
  232.  
  233. //
  234. // Nick
  235. //
  236. // Percent sign (%) will be replaced into a random number from 0 to 9.
  237. // For example, Guest%%% will become Guest123 on page load.
  238. //
  239. // @type string
  240. // @default "thelounge%%"
  241. //
  242. nick: "WeakNet%%",
  243.  
  244. //
  245. // Username
  246. //
  247. // @type string
  248. // @default "thelounge"
  249. //
  250. username: "weaknet",
  251.  
  252. //
  253. // Real Name
  254. //
  255. // @type string
  256. // @default "The Lounge User"
  257. //
  258. realname: "WeakNet Chat",
  259.  
  260. //
  261. // Channels
  262. // This is a comma-separated list.
  263. //
  264. // @type string
  265. // @default "#thelounge"
  266. //
  267. join: "#weaknet",
  268. },
  269.  
  270. //
  271. // Set socket.io transports
  272. //
  273. // @type array
  274. // @default ["polling", "websocket"]
  275. //
  276. transports: ["polling", "websocket"],
  277.  
  278. //
  279. // Run The Lounge using encrypted HTTP/2.
  280. // This will fallback to regular HTTPS if HTTP/2 is not supported.
  281. //
  282. // @type object
  283. // @default {}
  284. //
  285. https: {
  286. //
  287. // Enable HTTP/2 / HTTPS support.
  288. //
  289. // @type boolean
  290. // @default false
  291. //
  292. enable: false,
  293.  
  294. //
  295. // Path to the key.
  296. //
  297. // @type string
  298. // @example "sslcert/key.pem"
  299. // @default ""
  300. //
  301. key: "",
  302.  
  303. //
  304. // Path to the certificate.
  305. //
  306. // @type string
  307. // @example "sslcert/key-cert.pem"
  308. // @default ""
  309. //
  310. certificate: "",
  311.  
  312. //
  313. // Path to the CA bundle.
  314. //
  315. // @type string
  316. // @example "sslcert/bundle.pem"
  317. // @default ""
  318. //
  319. ca: "",
  320. },
  321.  
  322. //
  323. // Default quit and part message if none is provided.
  324. //
  325. // @type string
  326. // @default "The Lounge - https://thelounge.chat"
  327. //
  328. leaveMessage: "WeakNet WebChat - https://weaknet.eu",
  329.  
  330. //
  331. // Run The Lounge with identd support.
  332. //
  333. // @type object
  334. // @default {}
  335. //
  336. identd: {
  337. //
  338. // Run the identd daemon on server start.
  339. //
  340. // @type boolean
  341. // @default false
  342. //
  343. enable: false,
  344.  
  345. //
  346. // Port to listen for ident requests.
  347. //
  348. // @type int
  349. // @default 113
  350. //
  351. port: 113,
  352. },
  353.  
  354. //
  355. // Enable oidentd support using the specified file
  356. //
  357. // Example: oidentd: "~/.oidentd.conf",
  358. //
  359. // @type string
  360. // @default null
  361. //
  362. oidentd: null,
  363.  
  364. //
  365. // LDAP authentication settings (only available if public=false)
  366. // @type object
  367. // @default {}
  368. //
  369. // The authentication process works as follows:
  370. //
  371. // 1. Lounge connects to the LDAP server with its system credentials
  372. // 2. It performs a LDAP search query to find the full DN associated to the
  373. // user requesting to log in.
  374. // 3. Lounge tries to connect a second time, but this time using the user's
  375. // DN and password. Auth is validated iff this connection is successful.
  376. //
  377. // The search query takes a couple of parameters in `searchDN`:
  378. // - a base DN `searchDN/base`. Only children nodes of this DN will be likely
  379. // to be returned;
  380. // - a search scope `searchDN/scope` (see LDAP documentation);
  381. // - the query itself, build as (&(<primaryKey>=<username>) <filter>)
  382. // where <username> is the user name provided in the log in request,
  383. // <primaryKey> is provided by the config and <fitler> is a filtering complement
  384. // also given in the config, to filter for instance only for nodes of type
  385. // inetOrgPerson, or whatever LDAP search allows.
  386. //
  387. // Alternatively, you can specify the `bindDN` parameter. This will make the lounge
  388. // ignore searchDN options and assume that the user DN is always:
  389. // <bindDN>,<primaryKey>=<username>
  390. // where <username> is the user name provided in the log in request, and <bindDN>
  391. // and <primaryKey> are provided by the config.
  392. //
  393. ldap: {
  394. //
  395. // Enable LDAP user authentication
  396. //
  397. // @type boolean
  398. // @default false
  399. //
  400. enable: false,
  401.  
  402. //
  403. // LDAP server URL
  404. //
  405. // @type string
  406. //
  407. url: "ldaps://example.com",
  408.  
  409. //
  410. // LDAP connection tls options (only used if scheme is ldaps://)
  411. //
  412. // @type object (see nodejs' tls.connect() options)
  413. // @default {}
  414. //
  415. // Example:
  416. // You can use this option in order to force the use of IPv6:
  417. // {
  418. // host: 'my::ip::v6',
  419. // servername: 'example.com'
  420. // }
  421. tlsOptions: {},
  422.  
  423. //
  424. // LDAP base dn, alternative to searchDN
  425. //
  426. // @type string
  427. //
  428. // baseDN: "ou=accounts,dc=example,dc=com",
  429.  
  430. //
  431. // LDAP primary key
  432. //
  433. // @type string
  434. // @default "uid"
  435. //
  436. primaryKey: "uid",
  437.  
  438. //
  439. // LDAP search dn settings. This defines the procedure by which the
  440. // lounge first look for user DN before authenticating her.
  441. // Ignored if baseDN is specified
  442. //
  443. // @type object
  444. //
  445. searchDN: {
  446.  
  447. //
  448. // LDAP searching bind DN
  449. // This bind DN is used to query the server for the DN of the user.
  450. // This is supposed to be a system user that has access in read only to
  451. // the DNs of the people that are allowed to log in.
  452. //
  453. // @type string
  454. //
  455. rootDN: "cn=thelounge,ou=system-users,dc=example,dc=com",
  456.  
  457. //
  458. // Password of the lounge LDAP system user
  459. //
  460. // @type string
  461. //
  462. rootPassword: "1234",
  463.  
  464. //
  465. // LDAP filter
  466. //
  467. // @type string
  468. // @default "uid"
  469. //
  470. filter: "(objectClass=person)(memberOf=ou=accounts,dc=example,dc=com)",
  471.  
  472. //
  473. // LDAP search base (search only within this node)
  474. //
  475. // @type string
  476. //
  477. base: "dc=example,dc=com",
  478.  
  479. //
  480. // LDAP search scope
  481. //
  482. // @type string
  483. // @default "sub"
  484. //
  485. scope: "sub",
  486.  
  487. },
  488. },
  489.  
  490. // Extra debugging
  491. //
  492. // @type object
  493. // @default {}
  494. //
  495. debug: {
  496. // Enables extra debugging output provided by irc-framework.
  497. //
  498. // @type boolean
  499. // @default false
  500. //
  501. ircFramework: false,
  502.  
  503. // Enables logging raw IRC messages into each server window.
  504. //
  505. // @type boolean
  506. // @default false
  507. //
  508. raw: false,
  509. },
  510. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement