-
Notifications
You must be signed in to change notification settings - Fork 72
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
Added Mastodon to blocked services #100
Conversation
Do they often change? Would be great if you can, thank you! |
Due to the federated nature of Mastodon, new instances (and independent instances) are added constantly to the Mastodon network (especially given the current Twitter influx of users). Just as an FYI, the servers on the previously mentioned endpoint are the instances that adhere to the Mastodon Covenant.
I will make sure the list will be updated on each Github Action run. |
Hi @ameshkov and @IldarKamalov, I finished updating the PR by adding the dynamic server list code. As a small rundown, I also took the opportunity to update the Node version in the pipeline to the latest LTS version (version 18.x). If you have any questions or comments, don't hesitate to reach out. |
const mastodonRules = result.map((element) => { | ||
return `||${element.domain}^` | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need additional checks for mastodonRules
:
- Not less than N elements (how many is okay)?
- Not more than X elements (how many is a good upper limit? 100?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100 seems like a fair limit.
Just as an additional check, you want to sort them by total user count ? So that only the top 100 servers are blocked?
@@ -10,6 +10,7 @@ const HOSTLISTS_URL = 'https://adguardteam.github.io/HostlistsRegistry/assets'; | |||
const CONFIGURATION_FILE = 'configuration.json'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Mastodon logic is not related to hostlists and for better clarity I'd prefer to have it all in a separate file (mastodon.js
) imported into index.js
Thank you for the contribution! I've got a couple of nitpicks here and there, please take a look. |
Perfect! Thanks for the nitpicks, I will pick them up and ping you once they are ready for another round of reviews :) |
@ameshkov it's ready for another round of reviews 😄. I took the liberty of sorting the server list by the |
I've added the top 30 most popular Mastodon servers plus the two "official" instances run by Mastodon gGmbH themselves.
This is list is based on the "total_users" property from Mastodon's own page / API response (https://api.joinmastodon.org/servers).
This PR also might warrant a discussion about grabbing the content of the previously mentioned API call and build that list dynamically upon each Github workflow run due to the federated nature of Mastodon. Which I am more then happy to implement, if needed.☺️