This Caddy module retrieves ParsPack CDN IP ranges from their official source and makes them available for use in Caddy's trusted proxies and IP matchers.
- Automatically fetches IPv4 IP ranges from ParsPack endpoint
- Periodically refreshes the IP list to stay up-to-date
- Configurable refresh interval and timeout
- Supports Caddyfile configuration
Build Caddy with this module using xcaddy:
xcaddy build --with github.com/azolfagharj/caddy_parspack_ipThe simplest way to use this module is without any options. It will automatically fetch IP ranges from ParsPack and refresh them every hour:
trusted_proxies parspackYou can optionally configure the refresh interval and timeout:
trusted_proxies parspack {
interval 12h
timeout 15s
}| Name | Description | Type | Default |
|---|---|---|---|
| interval | How often ParsPack IP lists are retrieved | duration | 1h |
| timeout | Maximum time to wait for a response from ParsPack | duration | no timeout |
Both options are optional. If not specified, the module uses the default values shown above.
- Caddy v2.6.3 or later
This module is compatible with all Caddy v2.6.3+ versions including v2.7.x, v2.8.x, v2.9.x, v2.10.x, and future versions. The http.ip_sources namespace was introduced in Caddy v2.6.3, which is the minimum required version.
Apache-2.0
🤝 Enjoying this free project? Consider supporting its development