|
| 1 | +//! Envoy Dynamic Modules Rust SDK Examples |
| 2 | +//! |
| 3 | +//! This crate contains example implementations of Envoy dynamic modules using the Rust SDK. |
| 4 | +//! |
| 5 | +//! # HTTP Filters |
| 6 | +//! |
| 7 | +//! The main library exports HTTP filter examples that work with `declare_init_functions!`: |
| 8 | +//! - `passthrough` - A minimal filter that passes all data through unchanged. |
| 9 | +//! - `access_logger` - Logs request/response information. |
| 10 | +//! - `random_auth` - Randomly rejects requests (for testing). |
| 11 | +//! - `zero_copy_regex_waf` - Zero-copy regex-based WAF filter. |
| 12 | +//! - `header_mutation` - Adds/removes/modifies headers. |
| 13 | +//! - `metrics` - Collects request/response metrics. |
| 14 | +//! |
| 15 | +//! # Network Filters |
| 16 | +//! |
| 17 | +//! Network filter examples are provided as public modules. To use them, create a separate |
| 18 | +//! crate that includes this library and uses `declare_network_filter_init_functions!` with |
| 19 | +//! the module's `new_filter_config` function. |
| 20 | +//! |
| 21 | +//! Available network filters: |
| 22 | +//! - [`network_echo`] - Echoes data back to the client. |
| 23 | +//! - [`network_rate_limiter`] - Limits concurrent connections. |
| 24 | +//! - [`network_protocol_logger`] - Logs protocol information. |
| 25 | +//! - [`network_redis`] - Redis RESP protocol parser and command filter. |
| 26 | +//! |
| 27 | +//! # Listener Filters |
| 28 | +//! |
| 29 | +//! Listener filter examples are provided as public modules. To use them, create a separate |
| 30 | +//! crate that includes this library and uses `declare_listener_filter_init_functions!` with |
| 31 | +//! the module's `new_filter_config` function. |
| 32 | +//! |
| 33 | +//! Available listener filters: |
| 34 | +//! - [`listener_ip_allowlist`] - IP allowlist/blocklist filter. |
| 35 | +//! - [`listener_tls_detector`] - TLS protocol detection filter. |
| 36 | +//! - [`listener_sni_router`] - SNI-based routing filter. |
| 37 | +
|
1 | 38 | use envoy_proxy_dynamic_modules_rust_sdk::*; |
2 | 39 |
|
| 40 | +// HTTP filter examples. |
3 | 41 | mod http_access_logger; |
4 | 42 | mod http_header_mutation; |
5 | 43 | mod http_metrics; |
6 | 44 | mod http_passthrough; |
7 | 45 | mod http_random_auth; |
8 | 46 | mod http_zero_copy_regex_waf; |
9 | 47 |
|
| 48 | +// Network filter examples. |
| 49 | +// These modules can be used to create standalone network filter cdylibs. |
| 50 | +// See each module's documentation for usage instructions. |
| 51 | +pub mod network_echo; |
| 52 | +pub mod network_protocol_logger; |
| 53 | +pub mod network_rate_limiter; |
| 54 | +pub mod network_redis; |
| 55 | + |
| 56 | +// Listener filter examples. |
| 57 | +// These modules can be used to create standalone listener filter cdylibs. |
| 58 | +// See each module's documentation for usage instructions. |
| 59 | +pub mod listener_ip_allowlist; |
| 60 | +pub mod listener_sni_router; |
| 61 | +pub mod listener_tls_detector; |
| 62 | + |
10 | 63 | declare_init_functions!(init, new_http_filter_config_fn); |
11 | 64 |
|
12 | 65 | /// This implements the [`envoy_proxy_dynamic_modules_rust_sdk::ProgramInitFunction`]. |
|
0 commit comments