Compare commits

..

1 Commits

Author SHA1 Message Date
b3dfe6b3e2 Update Rust crate clap to 4.5.41
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing
2025-07-10 00:18:05 +00:00
3 changed files with 19 additions and 17 deletions

22
Cargo.lock generated
View File

@@ -21,9 +21,9 @@ dependencies = [
[[package]] [[package]]
name = "actix-files" name = "actix-files"
version = "0.6.8" version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c0d87f10d70e2948ad40e8edea79c8e77c6c66e0250a4c1f09b690465199576" checksum = "0773d59061dedb49a8aed04c67291b9d8cf2fe0b60130a381aab53c6dd86e9be"
dependencies = [ dependencies = [
"actix-http", "actix-http",
"actix-service", "actix-service",
@@ -31,7 +31,7 @@ dependencies = [
"actix-web", "actix-web",
"bitflags", "bitflags",
"bytes", "bytes",
"derive_more 2.0.1", "derive_more 0.99.19",
"futures-core", "futures-core",
"http-range", "http-range",
"log", "log",
@@ -432,9 +432,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]] [[package]]
name = "clap" name = "clap"
version = "4.5.48" version = "4.5.41"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2134bb3ea021b78629caa971416385309e0131b351b25e01dc16fb54e1b5fae" checksum = "be92d32e80243a54711e5d7ce823c35c41c9d929dc4ab58e1276f625841aadf9"
dependencies = [ dependencies = [
"clap_builder", "clap_builder",
"clap_derive", "clap_derive",
@@ -442,9 +442,9 @@ dependencies = [
[[package]] [[package]]
name = "clap_builder" name = "clap_builder"
version = "4.5.48" version = "4.5.41"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2ba64afa3c0a6df7fa517765e31314e983f51dda798ffba27b988194fb65dc9" checksum = "707eab41e9622f9139419d573eca0900137718000c517d47da73045f54331c3d"
dependencies = [ dependencies = [
"anstream", "anstream",
"anstyle", "anstyle",
@@ -454,9 +454,9 @@ dependencies = [
[[package]] [[package]]
name = "clap_derive" name = "clap_derive"
version = "4.5.47" version = "4.5.41"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbfd7eae0b0f1a6e63d4b13c9c478de77c2eb546fba158ad50b4203dc24b9f9c" checksum = "ef4f52386a59ca4c860f7393bcf8abd8dfd91ecccc0f774635ff68e92eeef491"
dependencies = [ dependencies = [
"heck", "heck",
"proc-macro2", "proc-macro2",
@@ -1117,9 +1117,9 @@ dependencies = [
[[package]] [[package]]
name = "log" name = "log"
version = "0.4.28" version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
[[package]] [[package]]
name = "memchr" name = "memchr"

View File

@@ -7,12 +7,12 @@ license = "GPL-3.0-only"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
clap = { version = "4.5.48", features = ["derive", "env"] } clap = { version = "4.5.41", features = ["derive", "env"] }
actix-web = "4.11.0" actix-web = "4.11.0"
actix-files = "0.6.8" actix-files = "0.6.6"
actix-multipart = "0.7.2" actix-multipart = "0.7.2"
env_logger = "0.11.8" env_logger = "0.11.8"
log = "0.4.28" log = "0.4.27"
bytes = "1.10.1" bytes = "1.10.1"
futures-util = { version = "0.3.31", default-features = false, features = ["std"] } futures-util = { version = "0.3.31", default-features = false, features = ["std"] }
tar = "0.4.44" tar = "0.4.44"

View File

@@ -84,9 +84,9 @@ fn get_remote_ip(req: &HttpRequest, args: &Args) -> String {
let mut ip = req.peer_addr().unwrap().ip().to_string(); let mut ip = req.peer_addr().unwrap().ip().to_string();
// We check if the request comes from a trusted reverse proxy // We check if the request comes from a trusted reverse proxy
if let Some(proxy) = args.proxy_ip.as_ref() if let Some(proxy) = args.proxy_ip.as_ref() {
&& match_ip(proxy, &ip) if match_ip(proxy, &ip) {
&& let Some(header) = req.headers().get("X-Forwarded-For") { if let Some(header) = req.headers().get("X-Forwarded-For") {
let header: Vec<String> = header let header: Vec<String> = header
.to_str() .to_str()
.unwrap() .unwrap()
@@ -98,6 +98,8 @@ fn get_remote_ip(req: &HttpRequest, args: &Args) -> String {
ip = header[0].to_string(); ip = header[0].to_string();
} }
} }
}
}
ip ip
} }