matrix-org / matrix-appservice-irc

Node.js IRC bridge for Matrix
Apache License 2.0
465 stars 150 forks source link

appservice-irc connect to a existing Bouncer / ZNC #1238

Open DravenJohnson opened 3 years ago

DravenJohnson commented 3 years ago

Is your feature request related to a problem? Please describe. users like me who already have znc setup for all my irc needs would like to better have this bridge connect directly to the znc instead of setup each of my irc network accounts again on the bridge config.yml

Describe the solution you'd like assume it should work out of box, consider the bridge is similar to irc client. however based on the test it seems not working. config.yml should able to setup a connection to znc, which then use znc bouncer as media to communicate with multiple irc network. one network config on bridge site, to znc, and znc can deal with multiple irc network issue.

Describe alternatives you've considered of course i can move my znc setting for multiple irc network to the bridge config, and setup each network one by one, but not as convenience as connect direct to existing bouncer

Additional context unless anything in setting was wrong, please point it out, otherwise i think it's a new feature should be added to the bridge.

Half-Shot commented 3 years ago

That sounds doable. I'm trying to think of what needs to happen on the bridge side though?

Does the bouncer make multiple networks appear as one? What's the syntax to join a room if that's the case?

Is there a way to ask the bouncer programmatically about the networks it handles?

warthog9 commented 3 years ago

It does not make multiple networks appear as one, it's basically a full on man-in-the-middle which then allows multiple clients to connect to ZNC

multiple clients <-> znc <-> actual irc network where there's a single user for the clients on the other end

Basically to connect matrix-appservice-irc <-> znc you'd need to connect to ZNC, from a specific user as a specific user (there's a magic password string to ZNC in the IRC password field that sets up user, client, network, and password) and then you can basically treat it as IRC with a couple of extra accounts (status and a few other something) users which are basically interfaces into the bouncer.

Given that you'd need have to have specific per-user information to connect to each network (because each users password will be unique to not only the user, the network, but the client), I suspect that's a fairly heavy lift to make (generically) work.

When I tried this yesterday, it did not go well mostly because of how matrix-appservice-irc wants to define the server connection. I did have success using heisenbridge, but that's a very different connection model than matrix-appservice-irc

strugee commented 2 years ago

Possibly relevant: znc/znc#1770