mirror of https://github.com/fafhrd91/actix-net
Bikeshed features names and remove unnecessary dependencies for 'actix-server-config' crate
This commit is contained in:
parent
cb052679ab
commit
c2679a280c
|
@ -14,24 +14,14 @@ name = "actix_server_config"
|
|||
path = "src/lib.rs"
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
features = ["ssl", "rust-tls"]
|
||||
features = ["openssl", "rustls"]
|
||||
|
||||
[features]
|
||||
default = []
|
||||
|
||||
# openssl
|
||||
ssl = ["tokio-openssl"]
|
||||
|
||||
# rustls
|
||||
rust-tls = ["rustls", "tokio-rustls"]
|
||||
openssl = ["tokio-openssl"]
|
||||
rustls = ["tokio-rustls"]
|
||||
|
||||
[dependencies]
|
||||
futures = "0.3.1"
|
||||
tokio = "0.2.0-alpha.6"
|
||||
|
||||
# openssl
|
||||
tokio-openssl = { version = "0.4.0-alpha.6", optional = true }
|
||||
|
||||
# rustls
|
||||
rustls = { version = "0.16.0", optional = true }
|
||||
tokio-rustls = { version = "0.12.0-alpha.8", optional = true }
|
||||
|
|
|
@ -177,7 +177,7 @@ impl IoStream for TcpStream {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "ssl")]
|
||||
#[cfg(feature = "openssl")]
|
||||
impl<T: IoStream + Unpin> IoStream for tokio_openssl::SslStream<T> {
|
||||
#[inline]
|
||||
fn peer_addr(&self) -> Option<net::SocketAddr> {
|
||||
|
@ -200,7 +200,7 @@ impl<T: IoStream + Unpin> IoStream for tokio_openssl::SslStream<T> {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "rust-tls")]
|
||||
#[cfg(feature = "rustls")]
|
||||
impl<T: IoStream + Unpin> IoStream for tokio_rustls::server::TlsStream<T> {
|
||||
#[inline]
|
||||
fn peer_addr(&self) -> Option<net::SocketAddr> {
|
||||
|
|
|
@ -14,7 +14,7 @@ edition = "2018"
|
|||
workspace = ".."
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
features = ["ssl", "tls", "rust-tls", "uds"]
|
||||
features = ["nativetls", "openssl", "rustls", "uds"]
|
||||
|
||||
[lib]
|
||||
name = "actix_server"
|
||||
|
@ -22,15 +22,9 @@ path = "src/lib.rs"
|
|||
|
||||
[features]
|
||||
default = []
|
||||
|
||||
# native-tls
|
||||
tls = ["native-tls", "tokio-tls"]
|
||||
|
||||
# openssl
|
||||
ssl = ["openssl", "tokio-openssl", "actix-server-config/ssl"]
|
||||
|
||||
# rustls
|
||||
rust-tls = ["rustls", "tokio-rustls", "webpki", "webpki-roots", "actix-server-config/rust-tls"]
|
||||
nativetls = ["native-tls", "tokio-tls"]
|
||||
openssl = ["open-ssl", "tokio-openssl", "actix-server-config/openssl"]
|
||||
rustls = ["rust-tls", "tokio-rustls", "webpki", "webpki-roots", "actix-server-config/rustls"]
|
||||
|
||||
# uds
|
||||
# uds = ["mio-uds", "tokio-uds", "actix-server-config/uds"]
|
||||
|
@ -57,16 +51,16 @@ tokio-timer = "0.3.0-alpha.6"
|
|||
mio-uds = { version = "0.6.7", optional = true }
|
||||
#tokio-uds = { version="0.2.5", optional = true }
|
||||
|
||||
# native-tls
|
||||
# nativetls
|
||||
native-tls = { version = "0.2", optional = true }
|
||||
tokio-tls = { version = "0.3.0-alpha.6", optional = true }
|
||||
|
||||
# openssl
|
||||
openssl = { version = "0.10", optional = true }
|
||||
open-ssl = { version = "0.10", package = "openssl", optional = true }
|
||||
tokio-openssl = { version = "0.4.0-alpha.6", optional = true }
|
||||
|
||||
# rustls
|
||||
rustls = { version = "0.16.0", optional = true }
|
||||
rust-tls = { version = "0.16.0", package = "rustls", optional = true }
|
||||
tokio-rustls = { version = "0.12.0-alpha.2", optional = true }
|
||||
webpki = { version = "0.21", optional = true }
|
||||
webpki-roots = { version = "0.17", optional = true }
|
||||
|
|
|
@ -3,19 +3,19 @@ use std::sync::atomic::{AtomicUsize, Ordering};
|
|||
|
||||
use crate::counter::Counter;
|
||||
|
||||
#[cfg(feature = "ssl")]
|
||||
#[cfg(feature = "openssl")]
|
||||
mod openssl;
|
||||
#[cfg(feature = "ssl")]
|
||||
#[cfg(feature = "openssl")]
|
||||
pub use self::openssl::OpensslAcceptor;
|
||||
|
||||
#[cfg(feature = "tls")]
|
||||
#[cfg(feature = "nativetls")]
|
||||
mod nativetls;
|
||||
#[cfg(feature = "tls")]
|
||||
#[cfg(feature = "nativetls")]
|
||||
pub use self::nativetls::NativeTlsAcceptor;
|
||||
|
||||
#[cfg(feature = "rust-tls")]
|
||||
#[cfg(feature = "rustls")]
|
||||
mod rustls;
|
||||
#[cfg(feature = "rust-tls")]
|
||||
#[cfg(feature = "rustls")]
|
||||
pub use self::rustls::RustlsAcceptor;
|
||||
|
||||
/// Sets the maximum per-worker concurrent ssl connection establish process.
|
||||
|
|
Loading…
Reference in New Issue