Page 1 of 2

webirc configuration does not work with thelounge client

Posted: Fri Jun 26, 2020 6:09 pm
by Suratka
hi, I installed on an external server "thelounge" client, and I configured in the client the ip and password of my ircd unrealircd 4.2.4, after I configured in unrealircd.conf in the webirc block, where I also have the ip and the password for kiwwiirc and Mibbit and these two work fine. But loungechat doesn't work,
it does not connect to the irc server. Do you know why?

Re: webirc configuration does not work with thelounge client

Posted: Fri Jun 26, 2020 6:34 pm
by PeGaSuS
Need more feedback

Also, on config.js of TheLounge client, be sure to set this line https://github.com/thelounge/thelounge/ ... fig.js#L44 to use the IP that you've configured in UnrealIRCd webirc block, like:

Code: Select all

bind: "127.0.0.1,
in case that your machine has more than one IP address or has support for IPv4 and IPv6, because if you let it as it is, it will choose a random IP to connect and will prefer IPv6 over IPv4.

Then try to connect again via TheLounge.

Hope this helps.

Cheers

Re: webirc configuration does not work with thelounge client

Posted: Fri Jun 26, 2020 6:44 pm
by Suratka
wait, wait, go slowly. I'm not a great expert and over-technical language confuses me.
can you explain to me in simple words and step by step what should i do and what should i write and where?
and I don't understand that 127.0.0.1 what centers, if tehlounge is not installed on the same server where unrealircd is housed.
please if you can paste the line or lines to copy in config.js.
I would be really grateful to you. ;)

Re: webirc configuration does not work with thelounge client

Posted: Fri Jun 26, 2020 6:53 pm
by Suratka

Code: Select all

webirc { 
mask 91.92.xx.xx; 
password "password";
};
questo è quello che ho impostato nel mio unrealircd.conf; 91.92.xx.xx è l'ip del server dove è installato "thelounge"

Code: Select all

webirc: {
          "irc.XXXXXX.net": (webircObj, network) => {
            webircObj.password = "password";
            webircObj.hostname = `webirc/${webircObj.hostname}`;
            return webircObj;
          },
        },
questo è come ho impostato config.js di tehlounge.

Re: webirc configuration does not work with thelounge client

Posted: Fri Jun 26, 2020 6:57 pm
by PeGaSuS
Also, change your TheLounge webirc line to something like this:

Code: Select all

webirc: { "irc.xxx.net": "password"},

Re: webirc configuration does not work with thelounge client

Posted: Fri Jun 26, 2020 7:07 pm
by PeGaSuS
Quick fix

1) On TheLounge search for:

Code: Select all

bind: undefined,
and replace it by

Code: Select all

bind "91.92.xxx.xxx",

2) Change your webirc line on TheLounge by:

Code: Select all

webirc: { "irc.xxxx.net": "password" },
This should do the trick.

Cheers

Re: webirc configuration does not work with thelounge client

Posted: Fri Jun 26, 2020 7:10 pm
by Suratka

Code: Select all

Connection closed unexpectedly: Error: connect EINVAL 199.181.xxx.XXX:6697 - Local (127.0.0.1:46533)
with the line you gave me, and with bind: "127.0.0.1", it gives me this error,
if instead I change 127.0.0.1 cn 91.92.XX.XX, the IP address of the vps which contains thelounge, then it connects but with the ip of the vps, that is: 91.92.XX.XX

Re: webirc configuration does not work with thelounge client

Posted: Fri Jun 26, 2020 7:12 pm
by PeGaSuS
Be sure to restart TheLounge and confirm that the password is correct.

Re: webirc configuration does not work with thelounge client

Posted: Fri Jun 26, 2020 7:23 pm
by Suratka
I do not understand. everything seems ok the setup.
the bind is set with the ip of the vps that hosts tehlounge.
I copied the line you gave me and inserted it in the webirc block of config.js, being careful to insert the correct password and the ip of the irc server.
Where am I wrong?

ps.
I restart it every time I make a change to config.js.

Re: webirc configuration does not work with thelounge client

Posted: Fri Jun 26, 2020 7:26 pm
by PeGaSuS
I assume that you've rehashed UnrealIRCd too?

Re: webirc configuration does not work with thelounge client

Posted: Fri Jun 26, 2020 7:36 pm
by Suratka
obviously yes

Re: webirc configuration does not work with thelounge client

Posted: Fri Jun 26, 2020 7:39 pm
by Suratka
with the same password and method, but obviously with different IPs, I have configured kiwiirc and mibbit and they work very well.

Re: webirc configuration does not work with thelounge client

Posted: Fri Jun 26, 2020 7:40 pm
by PeGaSuS
can you paste the bind and webirc lines from TheLounge?
You can omit the IP, but don't omit any quotes or punctuation.

Re: webirc configuration does not work with thelounge client

Posted: Fri Jun 26, 2020 7:52 pm
by Suratka

Code: Select all

// ## WEBIRC support
	//
	// When 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 that The Lounge will be connecting to and generally involves a lot
	// of trust from the network you are connecting to.
	//
	// There are 2 ways to configure the `webirc` setting:
	//
	// - **Basic**: an object where keys are IRC hosts and values are passwords.
	//   For example:
	//
	//   ```json
	//   webirc: {
	//     "irc.example.net": "thisiswebircpassword1",
	//     "irc.example.org": "thisiswebircpassword2",
	//   },
	//   ```
	//
	// - **Advanced**: an object where keys are IRC hosts and values are functions
	//   that take two arguments (`webircObj`, `network`) and return an
	//   object to be directly passed to `irc-framework`. `webircObj` contains the
	//   generated object which you can modify. For example:
	//
	//   ```js
	//   webirc: {
	//     "irc.example.com": (webircObj, network) => {
	//       webircObj.password = "thisiswebircpassword";
	//       webircObj.hostname = `webirc/${webircObj.hostname}`;
	//       return webircObj;
	//     },
	//   },
	//   ```
	//
	// This value is set to `null` to disable WEBIRC by default.
	webirc: { "irc.xxxx.net": "password"},
          
	// ## identd and oidentd support

	// ### `identd`
	//
	// Run The Lounge with `identd` support.
	//
	// The available keys for the `identd` object are:
	//
	// - `enable`: When `true`, the identd daemon runs on server start.
	// - `port`: Port to listen for ident requests.
	//
	// The value of `enable` is set to `false` to disable `identd` support by
	// default, in which case the value of `port` is ignored. The default value of
	// `port` is 113.
	identd: {
		enable: true,
		port: 4400,

Re: webirc configuration does not work with thelounge client

Posted: Fri Jun 26, 2020 7:57 pm
by Suratka

Code: Select all

"use strict";

module.exports = {
	// ## Server settings

	// ### `public`
	//
	// When set to `true`, The Lounge starts in public mode. When set to `false`,
	// it starts in private mode.
	//
	// - A **public server** does not require authentication. Anyone can connect
	//   to IRC networks in this mode. All IRC connections and channel
	//   scrollbacks are lost when a user leaves the client.
	// - A **private server** requires users to log in. Their IRC connections are
	//   kept even when they are not using or logged in to the client. All joined
	//   channels and scrollbacks are available when they come back.
	//
	// This value is set to `false` by default.
	public: true,

	// ### `host`
	//
	// IP address or hostname for the web server to listen to. For example, set it
	// to `"127.0.0.1"` to accept connections from localhost only.
	//
	// For UNIX domain sockets, use `"unix:/absolute/path/to/file.sock"`.
	//
	// This value is set to `undefined` by default to listen on all interfaces.
	host: undefined,

	// ### `port`
	//
	// Set the port to listen to.
	//
	// This value is set to `9000` by default.
	port: XXXX,

	// ### `bind`
	//
	// Set the local IP to bind to for outgoing connections.
	//
	// This value is set to `undefined` by default to let the operating system
	// pick its preferred one.
	bind: "91.92.XXX.XXX",

	// ### `reverseProxy`
	//
	// When set to `true`, The Lounge is marked as served behind a reverse proxy
	// and will honor the `X-Forwarded-For` header.
	//
	// This value is set to `false` by default.
	reverseProxy: false,