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

Feature Request | Move the Special Rules list #409

Open
spirillen opened this issue Dec 9, 2024 · 2 comments
Open

Feature Request | Move the Special Rules list #409

spirillen opened this issue Dec 9, 2024 · 2 comments
Assignees

Comments

@spirillen
Copy link
Contributor

What is the feature you'd like to request?

I suggest we moves the rules.py contests of:

self.regex_active2inactive = {
r"\.000webhostapp\.com": [
(self.switch_to_down_if_status_code, {410, 424}),
],
r"\.24\.eu$": [(self.switch_to_down_if_status_code, 503)],
r"\.altervista\.org$": [(self.switch_to_down_if_status_code, 403)],
r"\.angelfire\.com$": [(self.switch_to_down_if_status_code, 404)],
r"\.blogspot\.": [self.handle_blogspot],
r"\.canalblog\.com$": [(self.switch_to_down_if_status_code, 404)],
r"\.dr\.ag$": [(self.switch_to_down_if_status_code, 503)],
r"\.fc2\.com$": [self.handle_fc2_dot_com],
r"\.github\.io$": [(self.switch_to_down_if_status_code, 404)],
r"\.glitchz\.me$": [(self.switch_to_down_if_status_code, 403)],
r"\.godaddysites\.com$": [(self.switch_to_down_if_status_code, 404)],
r"\.hpg.com.br$": [(self.switch_to_down_if_status_code, 404)],
r"\.imgur\.com$": [self.handle_imgur_dot_com],
r"\.liveadvert\.com$": [(self.switch_to_down_if_status_code, 404)],
r"\.myhuaweicloudz\.com$": [(self.switch_to_down_if_status_code, 403)],
r"\.skyrock\.com$": [(self.switch_to_down_if_status_code, 404)],
r"\.sz.id$": [(self.switch_to_down_if_status_code, 302)],
r"\.translate\.goog$": [(self.switch_to_down_if_status_code, 403)],
r"\.tumblr\.com$": [(self.switch_to_down_if_status_code, 404)],
r"\.vercel\.app$": [(self.switch_to_down_if_status_code, 451)],
r"\.web\.app$": [(self.switch_to_down_if_status_code, 404)],
r"\.wix\.com$": [(self.switch_to_down_if_status_code, 404)],
r"^s3\.ap-south-1\.amazonaws\.com$": [
(self.switch_to_down_if_status_code, 403)
],
r"^u\.pcloud\.com$": [(self.switch_to_down_if_status_code, 302)],
r"\.wordpress\.com$": [
(self.switch_to_down_if_status_code, 410),
self.handle_wordpress_dot_com,
],
r"\.weebly\.com$": [(self.switch_to_down_if_status_code, {"404", "406"})],
r"\.zzz\.com\.ua$": [(self.switch_to_down_if_status_code, {"402"})],
}

As this is plain json, I suggest this part is giving it's own branch or REPO to avoid waiting to long for updates, You should grant a number of users moderator rights on this files AND the requirements of two moderators approval before it's merge able.

This can remove the stalled time and properly a lot of merge issues such as #404

What problem are you trying to solve?

I'm trying to solve a problem where...

What solution would you like to see?

A single point of "failure" awaiting a single users approval, for something that should be rather flexible for a number of trusted users to merge and maintain, and this list should not be depending on the rest of the pyfunceble project + is can be shared to other project.

Are there any alternatives you've considered?

I've considered alternatives such as...

Additional context

This JSON file should be a JSON5 file, to allow adding comments inside the file, for easier maintenance.

funilrys added a commit that referenced this issue Dec 27, 2024
This patch (partially) fixes #409.

Indeed, before this patch, end-user couldn't bring their own
rules. Therefore, through this patch, we expose part of our
internal through a "user-friendly" configuration key.

There a room for improvement, but this first version should handle
most of the cases.
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in PyFunceble Backlog Dec 28, 2024
@spirillen
Copy link
Contributor Author

spirillen commented Dec 28, 2024

Super,

after reviewing the MR, I have one two question, can you load these rules from a external source for sharing among all your devices? In example. I run my own rule set, Phishing-Database run theirs, can I load both of them? or are their still per hosts based PyFunce.overwrite.yml

@funilrys
Copy link
Owner

funilrys commented Jan 7, 2025

Reopening, as I want to make this extensible to solve your use case.

@funilrys funilrys reopened this Jan 7, 2025
@github-project-automation github-project-automation bot moved this from ✅ Done to 📋 Backlog in PyFunceble Backlog Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants