Debian Codegraph @

/

debian rust-client-ip 0.2.1-2debian librust-client-ip-dev debian librust-client-ip+default-dev debian librust-client-ip+forwarded-header-dev debian librust-client-ip-0+default-dev debian librust-client-ip-0+forwarded-header-dev debian librust-client-ip-0-dev debian librust-client-ip-0.2+default-dev debian librust-client-ip-0.2+forwarded-header-dev debian librust-client-ip-0.2-dev debian librust-client-ip-0.2.1+default-dev debian librust-client-ip-0.2.1+forwarded-header-dev debian librust-client-ip-0.2.1-dev cargo client-ip 0.2.1 debianjsonmakefilemarkdownrustrust-c-abishelltomlyaml 17 files · 171 symbols
View dependency graph

Depends on

  • dh-cargo (dh-sequence-cargo)
  • cargo, debhelper-compat, librust-forwarded-header-value-0.1+default-dev, librust-http-1+default-dev, libstd-rust-dev, rustc
README (full)

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.

ExtractorHeader UsedTypical Proxy / Service
[cf_connecting_ip]CF-Connecting-IPCloudflare
[cloudfront_viewer_address]CloudFront-Viewer-AddressAWS CloudFront
[fly_client_ip]Fly-Client-IPFly.io
[rightmost_forwarded]ForwardedProxies supporting RFC 7239 (extracts rightmost for=)
[rightmost_x_forwarded_for]X-Forwarded-ForNginx, Apache, HAProxy, CDNs, LBs
[true_client_ip]True-Client-IPCloudflare, Akamai
[x_envoy_external_address]X-Envoy-External-AddressEnvoy
[x_real_ip]X-Real-IpNginx

Contributing

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

License

This project is licensed under the MIT license.

dir .github/
dir debian/
dir src/
file .cargo_vcs_info.json
file .editorconfig
file .gitignore
file .pre-commit.sh
file .rustfmt.toml
file Cargo.lock
file Cargo.toml
file Cargo.toml.orig
file LICENSE
file README.md