mastodon / mastodon

Your self-hosted, globally interconnected microblogging community
https://joinmastodon.org
GNU Affero General Public License v3.0
47.21k stars 7k forks source link

Manage domain blocks with tootctl #11553

Open noplanman opened 5 years ago

noplanman commented 5 years ago

Pitch

It would be great if there was a tootctl command to moderate domain blocks (silence / suspend).

Maybe adding to the domains commands something like this?

Motivation

Managing an instance through Ansible for example, this would make general moderation much easier and allow for easy modification.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

davidwolfpaw commented 2 years ago

Responding to see if this can be opened again. I think that this could be a useful feature.

I personally would like this feature to script out creating block lists that I could then share with others.

hello-smile6 commented 2 years ago

Responding to see if this can be opened again. I think that this could be a useful feature.

I personally would like this feature to script out creating block lists that I could then share with others.

Agree

stop5 commented 2 years ago

i think it would be a good idea too.

rixx commented 1 year ago

I'd like to add a reason for this to get implemented: When blocking a domain with many, many subdomains, like the recent activitypub-troll.cf, the web interface runs into a timeout.

(Note: I'm not actually sure if our block was ever correctly processed for most or all subdomains – none of them show up as suspended, and I'm not sure if they would, by just adding the parent domain block. In any case it felt like we ran into undefined behaviour and that wasn't great. Not sure if that should be a separate bug report.)

Running the domain block via tootctl would allow us to circumvent the web timeout and offer extended scripting capabilities to admins, which would be nice in general.

rodti commented 1 year ago

I'd like to add a reason for this to get implemented: When blocking a domain with many, many subdomains, like the recent activitypub-troll.cf, the web interface runs into a timeout.

(Note: I'm not actually sure if our block was ever correctly processed for most or all subdomains – none of them show up as suspended, and I'm not sure if they would, by just adding the parent domain block. In any case it felt like we ran into undefined behaviour and that wasn't great. Not sure if that should be a separate bug report.)

Running the domain block via tootctl would allow us to circumvent the web timeout and offer extended scripting capabilities to admins, which would be nice in general.

+1 for this, my server was rendered completely unresponsive by this attack today, but I could access the CLI and could have avoided lots of downtime!

rodti commented 1 year ago

See also https://github.com/mastodon/mastodon/issues/21977

jfrede commented 1 year ago

Would be nice to have to share domain block lists between instances and not have to copy and paste them into the webfrontend.

gvisoc commented 1 year ago

This would be extremely useful for an ever-growing number of instances. Using the Web UI doesn't scale.

ThisIsMissEm commented 8 months ago

This seems like it'd be possible through adding functionality to https://github.com/mastodon/mastodon/blob/main/lib/mastodon/cli/domains.rb

You'd want to base it on the create / update logic in https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/admin/domain_blocks_controller.rb

nesges commented 2 weeks ago

In the recent spamwaves we know very well which instances are home to the spammers (thanks to IFTAS), we only lack the tools to manage them effectively. a "bump" for this issue