← Open Source
JasonLovesDoggo

caddy-defender

Caddy module to block or manipulate requests originating from AIs or cloud services trying to train on your websites.

AI EngineeringTest & guardGo
Open on GitHub
Momentum
+0stars in 24 hours0.0%
585
Stars
26
Forks
+0
This week
14
Contributors
Created 2025-01-14 · Updated 2026-10-13 · #16545 today
Top developers
JasonLovesDoggocirca10aaleho

JasonLovesDoggo/caddy-defender is ranked 16,545 with 585 stars.

Same-category comparison

JasonLovesDoggo/caddy-defender is ranked 16,545 among these 8 peers; neo4j-labs/agent-memory is ranked 16,539.

Same-category comparison
NameRankMetrics
stevesolun/ctx16,516
Language:
Python
Stars:
587
Forks:
69
Description:
CTX Fit finds the cheapest AI coding setup that reliably works on your repository, then applies the winner as a reviewable change.
Boom5426/Nature-Paper-Skills16,522
Language:
Python
Stars:
586
Forks:
50
Description:
An AI-powered Scientific Writing Workflow: Agent skills for drafting, revising, auditing, and resubmitting Nature-style journal manuscripts.
FloridSleeves/LLMDebugger16,523
Language:
Python
Stars:
586
Forks:
57
Description:
LDB: A Large Language Model Debugger via Verifying Runtime Execution Step by Step (ACL'24).
neo4j-labs/agent-memory16,539
Language:
Python
Stars:
586
Forks:
109
openteams-lab/openteams16,554
Language:
TypeScript
Stars:
585
Forks:
78
HansZ8/RoboJuDo16,561
Language:
Python
Stars:
584
Forks:
84
Description:
A plug-and-play deploy framework for robots. Just deploy, just do.
IuvenisSapiens/ComfyUI_Qwen3-VL-Instruct16,562
Language:
Python
Stars:
584
Forks:
66
Description:
The successful integration of Qwen3-VL-Instruct series into the ComfyUI platform has enabled a smooth operation, supporting (but not limited to) text-based queries, video queries, single-image queries, and multi-image queries for generating captions or responses.
ZubeidHendricks/youtube-mcp-server16,566
Language:
TypeScript
Stars:
584
Forks:
141
Description:
MCP Server for YouTube API, enabling video management, Shorts creation, and advanced analytics.
Key parameters and specifications
Key parameters and specifications
ParameterValue
LanguageGo
CategoryAI Engineering
SubcategoryTest & guard
KeywordsAI safety, Anti-AI
Stars585
Forks26
Contributors14
Created date2025-01-14
Updated date2026-10-13
Stars in 1 day0
Stars in 7 days0
Rank16,545
Previous rank16,330
Rank change-215
7-day stars rank15,587
Previous 7-day stars rank15,600
7-day stars rank change13
Total stars rank17,119
Previous total stars rank17,087
Total stars rank change-32
CountryCanada
README summary

**Caddy Defender Plugin** The **Caddy Defender** plugin is a middleware for Caddy that allows you to block or manipulate requests based on the client's IP address. It is particularly useful for preventing unwanted traffic or polluting AI training data by returning garbage responses. **Embedded IP Ranges**: Predefined IP ranges for popular AI services (e. **Custom IP Ranges**: Add your own IP ranges via Caddyfile configuration. **Multiple Responder Backends**: **Block**: Return a response. **Garbage**: Return garbage data to pollute AI training

. **Redirect**: Return a response with a custom URL. **Ratelimit**: Ratelimit requests, configurable via caddy-ratelimit. **Tarpit**: Stream data at a slow, but configurable rate to stall bots and pollute AI training. **Run the Container**: Use the following command to run the container with your : Replace with the path to your . Please see the online documentation for other methods of installation. It has the following syntax: : The responder backend to use. Supported values are: : Returns a response. : Returns garbage data to

pollute AI training. : Marks requests for rate limiting (requires Caddy-Ratelimit to be installed as well ). : Stream data at a slow, but configurable rate to stall bots and pollute AI training. : An optional list of CIDR ranges or predefined range keys to match against the client's IP. : A custom message to return when using the responder. : The URI that the responder would redirect to. For more information about the configuration, refer to the configuration page on the website. For a

quick start, follow the Getting Started guide to protect your server using the _Caddy Defender Plugin_. These ranges are embedded in the binary and can be used without additional configuration. go | | AWS Region | aws-us-east-1, aws-us-west-1, aws-eu-west-1 | aws_region. go | | GitHub Copilot | githubcopilot | github. go | | Google Cloud Platform | gcloud | gcloud. go | | Oracle Cloud Infrastructure | oci | oracle. go | | Microsoft Azure | azurepubliccloud | azure. go | | Digital Ocean | digitalocean | digitalocean. go | | ASN (Autonomous System Numbers) | asn

| asn. for a precompiled list, see the embedded results **Contributing** We welcome contributions! bart - Karl Gaissmaier's efficient routing table implementation (Balanced ART adaptation) enabling our high-performance IP matching Built with ❤️ using Caddy.

Frequently asked questions

How many stars and forks are recorded?

JasonLovesDoggo/caddy-defender has 585 stars and 26 forks.

What is the repository rank?

JasonLovesDoggo/caddy-defender is ranked 16,545.

What language and category are recorded?

JasonLovesDoggo/caddy-defender has 585 stars, uses Go and belongs to AI Engineering.

Which repository is closest in rank?

JasonLovesDoggo/caddy-defender is compared with neo4j-labs/agent-memory, ranked 16,539 with 586 stars.

README

Caddy Defender Plugin

The Caddy Defender plugin is a middleware for Caddy that allows you to block or manipulate requests based on the client's IP address. It is particularly useful for preventing unwanted traffic or polluting AI training data by returning garbage responses.


Features

  • IP Range Filtering: Block or manipulate requests from specific IP ranges.
  • Embedded IP Ranges: Predefined IP ranges for popular AI services (e.g., OpenAI, DeepSeek, GitHub Copilot).
  • Custom IP Ranges: Add your own IP ranges via Caddyfile configuration.
  • Multiple Responder Backends:
    • Block: Return a 403 Forbidden response.
    • Custom: Return a custom message.
    • Drop: Drops the connection.
    • Garbage: Return garbage data to pollute AI training.
    • Redirect: Return a 308 Permanent Redirect response with a custom URL.
    • Ratelimit: Ratelimit requests, configurable via caddy-ratelimit.
    • Tarpit: Stream data at a slow, but configurable rate to stall bots and pollute AI training.

Installation

Using Docker

The easiest way to use the Caddy Defender plugin is by using the pre-built Docker image.

  1. Pull the Docker Image:

    docker pull ghcr.io/jasonlovesdoggo/caddy-defender:latest
    
  2. Run the Container: Use the following command to run the container with your Caddyfile:

    docker run -d \
      --name caddy \
      -v /path/to/Caddyfile:/etc/caddy/Caddyfile \
      -p 80:80 -p 443:443 \
      ghcr.io/jasonlovesdoggo/caddy-defender:latest
    

    Replace /path/to/Caddyfile with the path to your Caddyfile.

Please see the online documentation for other methods of installation.


Configuration

Caddyfile Syntax

The defender directive is used to configure the Caddy Defender plugin. It has the following syntax:

defender  {
    message 
    ranges 
    url 
}
  • ``: The responder backend to use. Supported values are:
    • block: Returns a 403 Forbidden response.
    • custom: Returns a custom message (requires message).
    • drop: Drops the connection.
    • garbage: Returns garbage data to pollute AI training.
    • redirect: Returns a 308 Permanent Redirect response (requires url).
    • ratelimit: Marks requests for rate limiting (requires Caddy-Ratelimit to be installed as well ).
    • tarpit: Stream data at a slow, but configurable rate to stall bots and pollute AI training.
  • ``: An optional list of CIDR ranges or predefined range keys to match against the client's IP. Defaults to aws azurepubliccloud deepseek gcloud githubcopilot openai.
  • ``: A custom message to return when using the custom responder.
  • ``: The URI that the redirect responder would redirect to.

For more information about the configuration, refer to the configuration page on the website.


Quick Start

The documentation website has info that includes the configurations of the plugin, code examples, and more.

For a quick start, follow the Getting Started guide to protect your server using the Caddy Defender Plugin.


For examples, check out docs/examples.md


Embedded IP Ranges

The plugin includes predefined IP ranges for popular AI services. These ranges are embedded in the binary and can be used without additional configuration.

Service Key IP Ranges
Alibaba Cloud aliyun aliyun.go
VPNs vpn vpn.go
AWS aws aws.go
AWS Region aws-us-east-1, aws-us-west-1, aws-eu-west-1 aws_region.go
DeepSeek deepseek deepseek.go
GitHub Copilot githubcopilot github.go
Google Cloud Platform gcloud gcloud.go
Oracle Cloud Infrastructure oci oracle.go
Microsoft Azure azurepubliccloud azure.go
OpenAI openai openai.go
Mistral mistral mistral.go
Vultr vultr vultr.go
Cloudflare cloudflare cloudflare.go
Digital Ocean digitalocean digitalocean.go
Linode linode linode.go
Datadog datadog datadog.go
Private private private.go
All IP addresses all all.go

Disabled by default (require manual inclusion at build time)

Service Key IP Ranges
Tor Exit Nodes tor tor.go
ASN (Autonomous System Numbers) asn asn.go

More are welcome! for a precompiled list, see the embedded results

Contributing

We welcome contributions! To get started, see CONTRIBUTING.md.


License

This project is licensed under the MIT License. See the LICENSE file for details.


Acknowledgments

Star History

Nearby in the ranking
Similar items