Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bridge K-lines into Matrix policy lists #1832

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

tadzik
Copy link
Contributor

@tadzik tadzik commented Nov 22, 2024

Currently, while K-lined users cannot connect to IRC and continue their abuse there, they're not being banned on the Matrix side. This allows to not only hang around in bridged Matrix rooms until manually removed from them, but also continue their abuse on Matrix itself.

This enhances our banSyncing capabilities to enable us to not only to subscribe to existing policylists, but also maintain our own. Each IRC network gets its own policy room (so that they can be subscribed to by mjolnir etc independently) which serves not only as a persistency layer for MatrixBanSync which stops us from pointlessly trying to (re)connect K-lined users, but also enables us to protect the wider Matrix network from those who proved to be abusive already.

Currently this does not bother to re-check if the K-line is still active – temporarily banned users have to manually arrange for being removed from the policy list, which the bridge will catch up and reconnect them if needed. We may want to consider allowing them to trigger the re-check manually, perhaps by issuing an explicit !reconnect in the bridge status room.

…pt to reconnect them

This can be combined with e.g. mjolnir[1] to more dilligently protect both IRC and Matrix
from abusive users.

[1] https://github.com/matrix-org/mjolnir
@tadzik tadzik requested a review from a team as a code owner November 22, 2024 13:37
@jkbzh
Copy link

jkbzh commented Feb 24, 2025

A naive question, shouldn't you take into account G-Lines in your patch? And also, will this keep bridges from trying to connect over and over to an irc server from which they are banned? I see this behavior on an irc server I admin. The bridges just ignore the G-Line so the server keeps closing the connection, and right away the bridges re-open it. This is forcing us to apply the ban at the TCP layer.

It is as if the bridges were designed to always try to reconnect when a connection is closed, but they are ignoring the G-Line and K-Line reasons in the connection shutdown reply. If I understood correctly, this is part of what your patch will solve.

If you could take into account G-Line reasons, it would be great!

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants