extract client ip from connection state

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-06-07 01:01:30 +00:00
parent 0bade5317f
commit 3ada847570
5 changed files with 36 additions and 0 deletions

29
Cargo.lock generated
View file

@ -227,6 +227,17 @@ dependencies = [
"tracing",
]
[[package]]
name = "axum-client-ip"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72188bed20deb981f3a4a9fe674e5980fd9e9c2bd880baa94715ad5d60d64c67"
dependencies = [
"axum 0.7.5",
"forwarded-header-value",
"serde",
]
[[package]]
name = "axum-core"
version = "0.3.4"
@ -625,6 +636,7 @@ name = "conduit_api"
version = "0.4.1"
dependencies = [
"axum 0.7.5",
"axum-client-ip",
"axum-extra",
"base64 0.22.1",
"bytes",
@ -715,6 +727,7 @@ name = "conduit_router"
version = "0.4.1"
dependencies = [
"axum 0.7.5",
"axum-client-ip",
"axum-server",
"axum-server-dual-protocol",
"bytes",
@ -1100,6 +1113,16 @@ dependencies = [
"percent-encoding",
]
[[package]]
name = "forwarded-header-value"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8835f84f38484cc86f110a805655697908257fb9a7af005234060891557198e9"
dependencies = [
"nonempty",
"thiserror",
]
[[package]]
name = "futf"
version = "0.1.5"
@ -2044,6 +2067,12 @@ dependencies = [
"minimal-lexical",
]
[[package]]
name = "nonempty"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e9e591e719385e6ebaeb5ce5d3887f7d5676fceca6411d1925ccc95745f3d6f7"
[[package]]
name = "nu-ansi-term"
version = "0.46.0"