From d20c5c4dab85b8cdbb3ca1d74756e90df8fe3c80 Mon Sep 17 00:00:00 2001 From: m00nwtchr Date: Fri, 4 Oct 2024 08:28:44 +0200 Subject: [PATCH] fix --- Cargo.lock | 13 ------------- Cargo.toml | 4 ++-- src/config/parser.rs | 3 ++- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b9222bc..de9a820 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3266,7 +3266,6 @@ dependencies = [ "sync_wrapper", "tokio 1.40.0", "tokio-rustls", - "tokio-socks", "tokio-util", "tower-service", "url 2.5.2", @@ -4097,18 +4096,6 @@ dependencies = [ "tokio 1.40.0", ] -[[package]] -name = "tokio-socks" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4770b8024672c1101b3f6733eab95b18007dbe0847a8afe341fcf79e06043f" -dependencies = [ - "either", - "futures-util", - "thiserror", - "tokio 1.38.0", -] - [[package]] name = "tokio-sync" version = "0.1.8" diff --git a/Cargo.toml b/Cargo.toml index 5eda203..68a3b4b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -174,7 +174,7 @@ opt-level = "z" [features] use-synonyms-search = ["thesaurus/static"] -default = ["memory-cache", "socks"] +default = ["memory-cache"] dhat-heap = ["dep:dhat"] memory-cache = ["dep:moka"] redis-cache = ["dep:redis", "dep:base64"] @@ -182,4 +182,4 @@ compress-cache-results = ["dep:async-compression", "dep:cfg-if"] encrypt-cache-results = ["dep:chacha20poly1305", "dep:chacha20"] cec-cache-results = ["compress-cache-results", "encrypt-cache-results"] experimental-io-uring = ["actix-web/experimental-io-uring"] -use-non-static-synonyms-search = ["thesaurus"] \ No newline at end of file +use-non-static-synonyms-search = ["thesaurus"] diff --git a/src/config/parser.rs b/src/config/parser.rs index e51f5ed..5d821c3 100644 --- a/src/config/parser.rs +++ b/src/config/parser.rs @@ -123,12 +123,13 @@ impl Config { _ => parsed_cet, }; - let proxy_opt = globals.get::<_, Option>("proxy")?; + let proxy_opt = globals.get::<_, Option>("proxy")?; let proxy = proxy_opt.and_then(|proxy_str| { Proxy::all(proxy_str).ok().and_then(|_| { log::error!("Invalid proxy url, defaulting to no proxy."); None }) + }); Ok(Config { port: globals.get::<_, u16>("port")?,