Watch
1
0
Fork
You've already forked rust-client-ip
0
No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniel Baumann c4bd34471c
Updating to debhelper 14.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2026-06-14 12:50:39 +02:00
.github/workflows Adding upstream version 0.1.1. 2025-12-31 14:22:23 +01:00
debian Updating to debhelper 14. 2026-06-14 12:50:39 +02:00
src Merging upstream version 0.2.1. 2026-02-27 08:59:23 +01:00
.cargo_vcs_info.json Merging upstream version 0.2.1. 2026-02-27 08:59:23 +01:00
.editorconfig Adding upstream version 0.1.1. 2025-12-31 14:22:23 +01:00
.gitignore Adding upstream version 0.1.1. 2025-12-31 14:22:23 +01:00
.pre-commit.sh Merging upstream version 0.2.1. 2026-02-27 08:59:23 +01:00
.rustfmt.toml Adding upstream version 0.1.1. 2025-12-31 14:22:23 +01:00
Cargo.lock Merging upstream version 0.2.1. 2026-02-27 08:59:23 +01:00
Cargo.toml Merging upstream version 0.2.1. 2026-02-27 08:59:23 +01:00
Cargo.toml.orig Merging upstream version 0.2.1. 2026-02-27 08:59:23 +01:00
LICENSE Adding upstream version 0.1.1. 2025-12-31 14:22:23 +01:00
README.md Merging upstream version 0.2.1. 2026-02-27 08:59:23 +01:00

client-ip

License Crates.io Docs.rs

Secure extraction of a client IP from http::HeaderMap. The code was initially extracted from the axum-client-ip crate for non-axum use.

If you're maintaining client IP extraction in other frameworks based on http, consider using this crate, so we can handle security-sensitive code in one place. Look at the axum-client-ip integration for reference.

Supported extractors

Open an issue if there's an uncovered header or send a PR straight away.

Extractor Header Used Typical Proxy / Service
[cf_connecting_ip] CF-Connecting-IP Cloudflare
[cloudfront_viewer_address] CloudFront-Viewer-Address AWS CloudFront
[fly_client_ip] Fly-Client-IP Fly.io
[rightmost_forwarded] Forwarded Proxies supporting RFC 7239 (extracts rightmost for=)
[rightmost_x_forwarded_for] X-Forwarded-For Nginx, Apache, HAProxy, CDNs, LBs
[true_client_ip] True-Client-IP Cloudflare, Akamai
[x_envoy_external_address] X-Envoy-External-Address Envoy
[x_real_ip] X-Real-Ip Nginx

Contributing

  • please run .pre-commit.sh before sending a PR, it will check everything

License

This project is licensed under the MIT license.