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:
parent
210d4fdb68
commit
94456ee4b1
@ -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",
|
||||
|
@ -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>;
|
||||
|
@ -14,3 +14,5 @@ pub use connector::HttpsConnector;
|
||||
mod simple;
|
||||
pub use simple::SimpleHttp;
|
||||
pub use simple::SimpleHttpOptions;
|
||||
|
||||
pub mod tls;
|
||||
|
@ -3,9 +3,6 @@
|
||||
#[cfg(feature = "websocket")]
|
||||
pub mod websocket;
|
||||
|
||||
#[cfg(feature = "http-helpers")]
|
||||
pub mod tls;
|
||||
|
||||
#[cfg(feature = "http-helpers")]
|
||||
pub mod uri;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user