wrap-real-ip

Warp filter to get the "real ip" of the remote client

This uses the "x-forwarded-for", "x-real-ip" or "forwarded" headers set by reverse proxies. To stop clients from abusing these headers, only headers set by trusted remotes will be accepted.

Example

```rust use warp::Filter; use warprealip::real_ip; use std::net::IpAddr;

let proxyaddr = [127, 10, 0, 1].into(); warp::any() .and(realip(vec![proxy_addr])) .map(|addr: Option| format!("Hello {}", addr.unwrap())); ```