1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
**Anti-Spoofing Client IP Extraction & Radix CIDR Allowlist/Denylist Plugin**
[](https://crates.io/crates/hyperlane-plugin-ip-filter)
[](https://docs.rs/hyperlane-plugin-ip-filter)
[](https://github.com/hyperlane-dev/hyperlane/actions/workflows/rust.yml)
[](https://www.rust-lang.org)
[](../../LICENSE)
[Workspace Overview](../../README.md) · [Plugin Catalog](../README.md) · [API Docs](https://docs.rs/hyperlane-plugin-ip-filter/latest/)
`hyperlane-plugin-ip-filter` extracts verified client IPs behind trusted proxies and enforces zero-allocation IPv4/IPv6 CIDR allowlists and denylists for [`hyperlane`](../../README.md) services (hook order `-125`). It is opt-in and transparent (`Status::Continue`) when unconfigured.
```sh
cargo add hyperlane-plugin-ip-filter
```
```rust
use hyperlane_plugin_ip_filter::{IpFilterConfig, IpFilterPlugin};
fn setup_ip_filter() {
}
```
```sh
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
```
This project is licensed under the MIT License. See the [LICENSE](../../LICENSE) file for details.
For inquiries, please contact the author at [root@devhub.vip](mailto:root@devhub.vip).