mirror of
https://github.com/fafhrd91/actix-net
synced 2025-08-15 15:53:52 +02:00
Compare commits
5 Commits
ioframe-v0
...
server-v0.
Author | SHA1 | Date | |
---|---|---|---|
|
e3155957a8 | ||
|
2667850d60 | ||
|
fba2002702 | ||
|
e733c562d9 | ||
|
8f05986a9f |
@@ -10,7 +10,7 @@ matrix:
|
|||||||
include:
|
include:
|
||||||
- rust: stable
|
- rust: stable
|
||||||
- rust: beta
|
- rust: beta
|
||||||
- rust: 1.36.0
|
- rust: 1.37.0
|
||||||
- rust: nightly-2019-06-15
|
- rust: nightly-2019-06-15
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- rust: nightly-2019-06-15
|
- rust: nightly-2019-06-15
|
||||||
|
@@ -7,7 +7,7 @@ Actix net - framework for composable network services
|
|||||||
* [API Documentation (Development)](https://actix.rs/actix-net/actix_net/)
|
* [API Documentation (Development)](https://actix.rs/actix-net/actix_net/)
|
||||||
* [Chat on gitter](https://gitter.im/actix/actix)
|
* [Chat on gitter](https://gitter.im/actix/actix)
|
||||||
* Cargo package: [actix-net](https://crates.io/crates/actix-net)
|
* Cargo package: [actix-net](https://crates.io/crates/actix-net)
|
||||||
* Minimum supported Rust version: 1.36 or later
|
* Minimum supported Rust version: 1.37 or later
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
|
@@ -1,5 +1,12 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
## [0.3.0] - 2019-10-03
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
* Update `rustls` to 0.16
|
||||||
|
* Minimum required Rust version upped to 1.37.0
|
||||||
|
|
||||||
## [0.2.5] - 2019-09-05
|
## [0.2.5] - 2019-09-05
|
||||||
|
|
||||||
* Add `TcpConnectService`
|
* Add `TcpConnectService`
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-connect"
|
name = "actix-connect"
|
||||||
version = "0.2.5"
|
version = "0.3.0"
|
||||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||||
description = "Actix Connector - tcp connector service"
|
description = "Actix Connector - tcp connector service"
|
||||||
keywords = ["network", "framework", "async", "futures"]
|
keywords = ["network", "framework", "async", "futures"]
|
||||||
@@ -51,11 +51,11 @@ openssl = { version="0.10", optional = true }
|
|||||||
tokio-openssl = { version="0.3", optional = true }
|
tokio-openssl = { version="0.3", optional = true }
|
||||||
|
|
||||||
#rustls
|
#rustls
|
||||||
rustls = { version = "0.15.2", optional = true }
|
rustls = { version = "0.16.0", optional = true }
|
||||||
tokio-rustls = { version = "0.9.1", optional = true }
|
tokio-rustls = { version = "0.10.0", optional = true }
|
||||||
webpki = { version = "0.19", optional = true }
|
webpki = { version = "0.21", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bytes = "0.4"
|
bytes = "0.4"
|
||||||
actix-testing = { version="0.1.0" }
|
actix-testing = { version="0.1.0" }
|
||||||
actix-server-config = "0.1.0"
|
actix-server-config = "0.2.0"
|
||||||
|
@@ -5,10 +5,7 @@ use actix_codec::{AsyncRead, AsyncWrite};
|
|||||||
use actix_service::{NewService, Service};
|
use actix_service::{NewService, Service};
|
||||||
use futures::{future::ok, future::FutureResult, Async, Future, Poll};
|
use futures::{future::ok, future::FutureResult, Async, Future, Poll};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use tokio_rustls::{
|
use tokio_rustls::{client::TlsStream, rustls::ClientConfig, Connect, TlsConnector};
|
||||||
rustls::{ClientConfig, ClientSession},
|
|
||||||
Connect, TlsConnector, TlsStream,
|
|
||||||
};
|
|
||||||
use webpki::DNSNameRef;
|
use webpki::DNSNameRef;
|
||||||
|
|
||||||
use crate::{Address, Connection};
|
use crate::{Address, Connection};
|
||||||
@@ -37,7 +34,7 @@ where
|
|||||||
connector: Arc<ClientConfig>,
|
connector: Arc<ClientConfig>,
|
||||||
) -> impl Service<
|
) -> impl Service<
|
||||||
Request = Connection<T, U>,
|
Request = Connection<T, U>,
|
||||||
Response = Connection<T, TlsStream<U, ClientSession>>,
|
Response = Connection<T, TlsStream<U>>,
|
||||||
Error = std::io::Error,
|
Error = std::io::Error,
|
||||||
> {
|
> {
|
||||||
RustlsConnectorService {
|
RustlsConnectorService {
|
||||||
@@ -61,7 +58,7 @@ where
|
|||||||
U: AsyncRead + AsyncWrite + fmt::Debug,
|
U: AsyncRead + AsyncWrite + fmt::Debug,
|
||||||
{
|
{
|
||||||
type Request = Connection<T, U>;
|
type Request = Connection<T, U>;
|
||||||
type Response = Connection<T, TlsStream<U, ClientSession>>;
|
type Response = Connection<T, TlsStream<U>>;
|
||||||
type Error = std::io::Error;
|
type Error = std::io::Error;
|
||||||
type Config = ();
|
type Config = ();
|
||||||
type Service = RustlsConnectorService<T, U>;
|
type Service = RustlsConnectorService<T, U>;
|
||||||
@@ -86,7 +83,7 @@ where
|
|||||||
U: AsyncRead + AsyncWrite + fmt::Debug,
|
U: AsyncRead + AsyncWrite + fmt::Debug,
|
||||||
{
|
{
|
||||||
type Request = Connection<T, U>;
|
type Request = Connection<T, U>;
|
||||||
type Response = Connection<T, TlsStream<U, ClientSession>>;
|
type Response = Connection<T, TlsStream<U>>;
|
||||||
type Error = std::io::Error;
|
type Error = std::io::Error;
|
||||||
type Future = ConnectAsyncExt<T, U>;
|
type Future = ConnectAsyncExt<T, U>;
|
||||||
|
|
||||||
@@ -114,7 +111,7 @@ impl<T: Address, U> Future for ConnectAsyncExt<T, U>
|
|||||||
where
|
where
|
||||||
U: AsyncRead + AsyncWrite + fmt::Debug,
|
U: AsyncRead + AsyncWrite + fmt::Debug,
|
||||||
{
|
{
|
||||||
type Item = Connection<T, TlsStream<U, ClientSession>>;
|
type Item = Connection<T, TlsStream<U>>;
|
||||||
type Error = std::io::Error;
|
type Error = std::io::Error;
|
||||||
|
|
||||||
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
|
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
|
||||||
|
@@ -30,6 +30,6 @@ log = "0.4"
|
|||||||
actix-rt = "0.2.2"
|
actix-rt = "0.2.2"
|
||||||
actix-connect = "0.2.0"
|
actix-connect = "0.2.0"
|
||||||
actix-testing = "0.1.0"
|
actix-testing = "0.1.0"
|
||||||
actix-server-config = "0.1.1"
|
actix-server-config = "0.2.0"
|
||||||
tokio-tcp = "0.1"
|
tokio-tcp = "0.1"
|
||||||
tokio-timer = "0.2"
|
tokio-timer = "0.2"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-server-config"
|
name = "actix-server-config"
|
||||||
version = "0.1.2"
|
version = "0.2.0"
|
||||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||||
description = "Actix server config utils"
|
description = "Actix server config utils"
|
||||||
homepage = "https://actix.rs"
|
homepage = "https://actix.rs"
|
||||||
@@ -33,6 +33,6 @@ futures = "0.1.25"
|
|||||||
tokio-io = "0.1.12"
|
tokio-io = "0.1.12"
|
||||||
tokio-tcp = "0.1"
|
tokio-tcp = "0.1"
|
||||||
tokio-openssl = { version="0.3.0", optional = true }
|
tokio-openssl = { version="0.3.0", optional = true }
|
||||||
rustls = { version = "0.15.2", optional = true }
|
rustls = { version = "0.16.0", optional = true }
|
||||||
tokio-rustls = { version = "0.9.1", optional = true }
|
tokio-rustls = { version = "0.10.0", optional = true }
|
||||||
tokio-uds = { version="0.2.5", optional = true }
|
tokio-uds = { version="0.2.5", optional = true }
|
||||||
|
@@ -1,5 +1,12 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
## [0.2.0] - 2019-10-03
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
* Update `rustls` to 0.16
|
||||||
|
* Minimum required Rust version upped to 1.37.0
|
||||||
|
|
||||||
## [0.1.2] - 2019-07-18
|
## [0.1.2] - 2019-07-18
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@@ -195,7 +195,7 @@ impl<T: IoStream> IoStream for tokio_openssl::SslStream<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(any(feature = "rust-tls"))]
|
#[cfg(any(feature = "rust-tls"))]
|
||||||
impl<T: IoStream> IoStream for tokio_rustls::TlsStream<T, rustls::ServerSession> {
|
impl<T: IoStream> IoStream for tokio_rustls::server::TlsStream<T> {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn peer_addr(&self) -> Option<net::SocketAddr> {
|
fn peer_addr(&self) -> Option<net::SocketAddr> {
|
||||||
self.get_ref().0.peer_addr()
|
self.get_ref().0.peer_addr()
|
||||||
|
@@ -1,5 +1,12 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
|
## [0.7.0] - 2019-10-04
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
* Update `rustls` to 0.16
|
||||||
|
* Minimum required Rust version upped to 1.37.0
|
||||||
|
|
||||||
## [0.6.1] - 2019-09-25
|
## [0.6.1] - 2019-09-25
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "actix-server"
|
name = "actix-server"
|
||||||
version = "0.6.1"
|
version = "0.7.0"
|
||||||
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
|
||||||
description = "Actix server - General purpose tcp server"
|
description = "Actix server - General purpose tcp server"
|
||||||
keywords = ["network", "framework", "async", "futures"]
|
keywords = ["network", "framework", "async", "futures"]
|
||||||
@@ -38,7 +38,7 @@ uds = ["mio-uds", "tokio-uds", "actix-server-config/uds"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
actix-rt = "0.2.2"
|
actix-rt = "0.2.2"
|
||||||
actix-service = "0.4.1"
|
actix-service = "0.4.1"
|
||||||
actix-server-config = "0.1.2"
|
actix-server-config = "0.2.0"
|
||||||
|
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
num_cpus = "1.0"
|
num_cpus = "1.0"
|
||||||
@@ -65,10 +65,10 @@ openssl = { version="0.10", optional = true }
|
|||||||
tokio-openssl = { version="0.3", optional = true }
|
tokio-openssl = { version="0.3", optional = true }
|
||||||
|
|
||||||
# rustls
|
# rustls
|
||||||
rustls = { version = "0.15.2", optional = true }
|
rustls = { version = "0.16.0", optional = true }
|
||||||
tokio-rustls = { version = "0.9.1", optional = true }
|
tokio-rustls = { version = "0.10.0", optional = true }
|
||||||
webpki = { version = "0.19", optional = true }
|
webpki = { version = "0.21", optional = true }
|
||||||
webpki-roots = { version = "0.16", optional = true }
|
webpki-roots = { version = "0.17", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bytes = "0.4"
|
bytes = "0.4"
|
||||||
|
@@ -4,9 +4,9 @@ use std::sync::Arc;
|
|||||||
|
|
||||||
use actix_service::{NewService, Service};
|
use actix_service::{NewService, Service};
|
||||||
use futures::{future::ok, future::FutureResult, Async, Future, Poll};
|
use futures::{future::ok, future::FutureResult, Async, Future, Poll};
|
||||||
use rustls::{ServerConfig, ServerSession};
|
use rustls::ServerConfig;
|
||||||
use tokio_io::{AsyncRead, AsyncWrite};
|
use tokio_io::{AsyncRead, AsyncWrite};
|
||||||
use tokio_rustls::{Accept, TlsAcceptor, TlsStream};
|
use tokio_rustls::{server::TlsStream, Accept, TlsAcceptor};
|
||||||
|
|
||||||
use crate::counter::{Counter, CounterGuard};
|
use crate::counter::{Counter, CounterGuard};
|
||||||
use crate::ssl::MAX_CONN_COUNTER;
|
use crate::ssl::MAX_CONN_COUNTER;
|
||||||
@@ -41,7 +41,7 @@ impl<T, P> Clone for RustlsAcceptor<T, P> {
|
|||||||
|
|
||||||
impl<T: AsyncRead + AsyncWrite, P> NewService for RustlsAcceptor<T, P> {
|
impl<T: AsyncRead + AsyncWrite, P> NewService for RustlsAcceptor<T, P> {
|
||||||
type Request = Io<T, P>;
|
type Request = Io<T, P>;
|
||||||
type Response = Io<TlsStream<T, ServerSession>, P>;
|
type Response = Io<TlsStream<T>, P>;
|
||||||
type Error = io::Error;
|
type Error = io::Error;
|
||||||
|
|
||||||
type Config = SrvConfig;
|
type Config = SrvConfig;
|
||||||
@@ -70,7 +70,7 @@ pub struct RustlsAcceptorService<T, P> {
|
|||||||
|
|
||||||
impl<T: AsyncRead + AsyncWrite, P> Service for RustlsAcceptorService<T, P> {
|
impl<T: AsyncRead + AsyncWrite, P> Service for RustlsAcceptorService<T, P> {
|
||||||
type Request = Io<T, P>;
|
type Request = Io<T, P>;
|
||||||
type Response = Io<TlsStream<T, ServerSession>, P>;
|
type Response = Io<TlsStream<T>, P>;
|
||||||
type Error = io::Error;
|
type Error = io::Error;
|
||||||
type Future = RustlsAcceptorServiceFut<T, P>;
|
type Future = RustlsAcceptorServiceFut<T, P>;
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ where
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<T: AsyncRead + AsyncWrite, P> Future for RustlsAcceptorServiceFut<T, P> {
|
impl<T: AsyncRead + AsyncWrite, P> Future for RustlsAcceptorServiceFut<T, P> {
|
||||||
type Item = Io<TlsStream<T, ServerSession>, P>;
|
type Item = Io<TlsStream<T>, P>;
|
||||||
type Error = io::Error;
|
type Error = io::Error;
|
||||||
|
|
||||||
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
|
fn poll(&mut self) -> Poll<Self::Item, Self::Error> {
|
||||||
|
@@ -19,7 +19,7 @@ path = "src/lib.rs"
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
actix-rt = "0.2.1"
|
actix-rt = "0.2.1"
|
||||||
actix-server = "0.5.0"
|
actix-server = "0.5.0"
|
||||||
actix-server-config = "0.1.0"
|
actix-server-config = "0.2.0"
|
||||||
actix-testing = "0.1.0"
|
actix-testing = "0.1.0"
|
||||||
|
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
@@ -18,8 +18,8 @@ path = "src/lib.rs"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-rt = "0.2.1"
|
actix-rt = "0.2.1"
|
||||||
actix-server = "0.6.0"
|
actix-server = "0.7.0"
|
||||||
actix-server-config = "0.1.0"
|
actix-server-config = "0.2.0"
|
||||||
actix-service = "0.4.0"
|
actix-service = "0.4.0"
|
||||||
|
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
|
@@ -195,7 +195,7 @@ fn from_hex(v: u8) -> Option<u8> {
|
|||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn restore_ch(d1: u8, d2: u8) -> Option<u8> {
|
fn restore_ch(d1: u8, d2: u8) -> Option<u8> {
|
||||||
from_hex(d1).and_then(|d1| from_hex(d2).and_then(move |d2| Some(d1 << 4 | d2)))
|
from_hex(d1).and_then(|d1| from_hex(d2).map(move |d2| d1 << 4 | d2))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
Reference in New Issue
Block a user