http: move TLS helper to client feature

it's only used there and pulls in hyper and tokio, which we don't
want/need in http-helpers.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2022-06-27 09:42:27 +02:00
parent 210d4fdb68
commit 94456ee4b1
5 changed files with 6 additions and 7 deletions

View File

@ -16,7 +16,7 @@ anyhow = "1.0"
base64 = { version = "0.13", optional = true }
futures = { version = "0.3", optional = true }
http = { version = "0.2", optional = true }
hyper = { version = "0.14", features = [ "full" ], optional = true }
hyper = { version = "0.14", default_features = false, optional = true }
openssl = { version = "0.10", optional = true }
serde_json = { version = "1.0", optional = true }
tokio = { version = "1.0", features = [], optional = true }
@ -30,8 +30,8 @@ proxmox-lang = { path = "../proxmox-lang", optional = true, version = "1.1" }
[features]
default = []
client = [ "futures", "http-helpers", "openssl" ]
http-helpers = [ "base64", "http", "hyper", "serde_json", "tokio/io-util", "tokio-openssl", "proxmox-sys", "url" ]
client = [ "futures", "http-helpers", "hyper/full", "openssl", "tokio/io-util", "tokio-openssl" ]
http-helpers = [ "base64", "http", "proxmox-sys", "serde_json", "url" ]
websocket = [
"base64",
"futures",

View File

@ -15,9 +15,9 @@ use tokio_openssl::SslStream;
use proxmox_sys::linux::socket::set_tcp_keepalive;
use crate::proxy_config::ProxyConfig;
use crate::tls::MaybeTlsStream;
use crate::uri::build_authority;
use super::tls::MaybeTlsStream;
use super::{RateLimitedStream, ShareableRateLimit};
type SharedRateLimit = Arc<dyn ShareableRateLimit>;

View File

@ -14,3 +14,5 @@ pub use connector::HttpsConnector;
mod simple;
pub use simple::SimpleHttp;
pub use simple::SimpleHttpOptions;
pub mod tls;

View File

@ -3,9 +3,6 @@
#[cfg(feature = "websocket")]
pub mod websocket;
#[cfg(feature = "http-helpers")]
pub mod tls;
#[cfg(feature = "http-helpers")]
pub mod uri;