Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
tuzzmaniandevil committed Sep 12, 2023
1 parent 212adee commit 6af05c6
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,46 @@

[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Naereen/StrapDown.js/graphs/commit-activity) [![GoReportCard example](https://goreportcard.com/badge/github.com/tuzzmaniandevil/caddy-dynamic-clientip)](https://goreportcard.com/report/github.com/tuzzmaniandevil/caddy-dynamic-clientip) ![GitHub](https://img.shields.io/github/license/tuzzmaniandevil/caddy-dynamic-clientip?_t=3145938)

`dynamic_client_ip` is a `client_ip` matcher clone that with one difference, instead of providing the IP ranges up front, You specify an `IPRangeSource` to allow the IP ranges to be dynamicly loaded per request.
The `dynamic_client_ip` module is a clone of the `client_ip` matcher with one key difference: instead of providing IP ranges upfront, you specify an `IPRangeSource`. This allows IP ranges to be dynamically loaded per request.

## Installation

Build Caddy using [xcaddy](https://github.com/caddyserver/xcaddy):

```shell
xcaddy build --with github.com/tuzzmaniandevil/caddy-dynamic-clientip
```

## Usage

```caddyfile
:8880 {
@denied dynamic_client_ip my_dynamic_provider
abort @denied
reverse_proxy localhost:8080
}
```

Example using the built-in static provider (But why though?)
```caddyfile
:8880 {
@denied dynamic_client_ip static 12.34.56.0/24 1200:ab00::/32
abort @denied
reverse_proxy localhost:8080
}
```

## Development

Before diving into development, make sure to follow the [Extending Caddy](https://caddyserver.com/docs/extending-caddy#extending-caddy) guide. This ensures you're familiar with the Caddy development process and that your environment is set up correctly.

To run Caddy with this module:
```shell
xcaddy run
```

## License

The project is licensed under the [Apache License](LICENSE).

0 comments on commit 6af05c6

Please sign in to comment.