Skip to content

feat(adidos): add adaptive ddos protection system plugin#159

Open
zolotarev wants to merge 2 commits into
bunkerity:mainfrom
zolotarev:main
Open

feat(adidos): add adaptive ddos protection system plugin#159
zolotarev wants to merge 2 commits into
bunkerity:mainfrom
zolotarev:main

Conversation

@zolotarev

Copy link
Copy Markdown

Add new ADIDOS plugin that monitors remote server load and dynamically enables/disables antibot protection based on configured thresholds. Includes webhook notifications and cooldown period settings.

Add new ADIDOS plugin that monitors remote server load and dynamically enables/disables antibot protection based on configured thresholds. Includes webhook notifications and cooldown period settings.
feat(adidos): add adaptive ddos protection system plugin
@TheophileDiot

Copy link
Copy Markdown
Member

Hi @zolotarev, apologies for the delay in our review.

I really like the idea behind this new plugin. That said, I think it would be a better fit as an external plugin rather than being included directly.

Would you be able to open a pull request on this repository?
bunkerity/bunkerweb-plugins

Thanks, and great work!

@TheophileDiot TheophileDiot self-assigned this Jan 28, 2026
@TheophileDiot TheophileDiot added the enhancement New feature or request label Jan 28, 2026
@TheophileDiot

Copy link
Copy Markdown
Member

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Apr 13, 2026

Copy link
Copy Markdown
✅ Actions performed

Full review triggered.

@coderabbitai

coderabbitai Bot commented Apr 13, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@TheophileDiot, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 34 minutes and 49 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 87eb8dd3-61f1-4eb0-9dfc-f9872abdf728

📥 Commits

Reviewing files that changed from the base of the PR and between 63de9b9 and 0bcf213.

📒 Files selected for processing (3)
  • adidos/README.md
  • adidos/jobs/adidos-monitor.py
  • adidos/plugin.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@TheophileDiot

Copy link
Copy Markdown
Member

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new adidos plugin intended to provide adaptive, load-triggered antibot enable/disable behavior driven by a scheduler job, with optional webhook notifications and configurable thresholds/cooldowns.

Changes:

  • Introduces ADIDOS plugin metadata and settings (plugin.json) including webhook and monitoring configuration.
  • Adds the scheduler job (adidos-monitor.py) to poll remote CPU load over SSH and update antibot settings in the DB.
  • Adds user documentation (README.md) describing setup, configuration, and operational notes.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 11 comments.

File Description
adidos/README.md Documents ADIDOS usage, SSH requirements, settings, and Docker deployment guidance.
adidos/plugin.json Declares the plugin, its settings (host, thresholds, webhook fields), and the scheduled job.
adidos/jobs/adidos-monitor.py Implements the monitoring loop, decision logic, DB updates, caching, and webhook notifications.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread adidos/plugin.json
Comment on lines +102 to +110
"ADIDOS_WEB_HOOK_URL": {
"context": "global",
"default": "https://ashoo:ashooPaZZword@n8n.its.bz/webhook/ashoo-telegram-send",
"help": "Web hook URL-address used to POST message",
"id": "adidos-seb-hook-url",
"label": "Web hook URL",
"regex": "^.*$",
"type": "text"
},
Comment thread adidos/plugin.json
@@ -0,0 +1,139 @@
{
"id": "Adidos",
Comment thread adidos/plugin.json
"description": "Adaptive DDoS Protection System",
"category": "antibot",
"help": "Monitor remote server system load and enable|disable antibot feature based on load metrics.",
"version": "1.2",
Comment thread adidos/plugin.json
Comment on lines +21 to +23
"default": "85.198.111.8",
"help": "Remote server hostname or IP to monitor.",
"id": "adidos-host",
Comment on lines +172 to +175
config = DB.get_config(with_drafts=True)
services = getenv("ADIDOS_SERVICES", "").split(" ")
config_update = config

Comment on lines +141 to +145
else:
cached_antibot = "yes"
last_activation = datetime.now()
cache_data = f"{cached_antibot},{datetime.now().isoformat()}"
JOB.cache_file("antibot_state", cache_data.encode())
Comment on lines +56 to +59
if response.status_code == 200:
LOGGER.info(f"Webhook sent successfully: {message}")
else:
LOGGER.error(f"Webhook failed with status {response.status_code}: {response.text}")

# Save to database
try:
captcha_type = getenv("ADIDOS_CAPTCHA_TYPE", "captcha")
Comment on lines +92 to +95
ssh_key_path,
"-o",
"StrictHostKeyChecking=no",
"-o",
Comment thread adidos/README.md
Comment on lines +24 to +28
The bw-scheduler container already includes SSH client pre-installed. You only need to:
- Mount or manually place an SSH private key in the container at the path specified in `ADIDOS_SSH_KEY` (default: `/usr/share/bunkerweb/scheduler/.ssh/id_rsa`)
- Ensure the key has passwordless access to the monitored server
- The SSH client is already available in the container via the src/scheduler/Dockerfile installation (at line 44 add `RUN apk add .... ssh`) or by installing it manually (docker exec bw-scheduler bash -c "apk add --no-cache openssh && which ssh")
- The SSH client version must be at least 7.0 (docker exec bw-scheduler bash -c "ssh -V")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants