hyperlane-plugin-ip-filter 23.3.2

A zero-allocation IP allowlist/denylist and anti-spoofing client IP extraction plugin for the Hyperlane framework with /8 radix-indexed CIDR lookup, IPv4-mapped IPv6 canonicalization, RFC 7239 Forwarded/X-Forwarded-For right-to-left proxy peeling, and prebuilt 403 wire responses.
Documentation

hyperlane-plugin-ip-filter

Anti-Spoofing Client IP Extraction & Radix CIDR Allowlist/Denylist Plugin

Crates.io Version Docs.rs CI Status Rust 2024 License: MIT

Workspace Overview · Plugin Catalog · API Docs


Overview

hyperlane-plugin-ip-filter extracts verified client IPs behind trusted proxies and enforces zero-allocation IPv4/IPv6 CIDR allowlists and denylists for hyperlane services (hook order -125). It is opt-in and transparent (Status::Continue) when unconfigured.

Installation

cargo add hyperlane-plugin-ip-filter

Usage

use hyperlane_plugin_ip_filter::{IpFilterConfig, IpFilterPlugin};

fn setup_ip_filter() {
    IpFilterPlugin::init(IpFilterConfig::default());
}

Verification

cargo run -p hyperlane-cli -- fmt --check
cargo clippy -p hyperlane-plugin-ip-filter --all-features --all-targets -- -D warnings
cargo test -p hyperlane-plugin-ip-filter --all-features

License

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

Contact

For inquiries, please contact the author at root@devhub.vip.