tls-listener
wrap incoming Stream of connections in TLS
0.11.2
7.4M downloads/mo
#3689 most downloaded on crates.io
tmccombs/tls-listener
What this package is like to depend on
Last release 9 months ago
22 Nov 2025
Release timing varies
gaps range from 3 weeks to 10 months
Most releases are documented
notes for 18 of 23 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
23 releases · first in 2019
2 releases in the last 12 months
see the full history below
Release timeline
23 releases · Feb 2019 to Nov 2025Releases
latest 23-
0.11.222 Nov 2025Release notes
Open source → -
0.11.120 Nov 2025Release notes
Open source →What's Changed
- feat: Add listener() method by @tmccombs in #55
- Add axum example by @SabrinaJewson in #54
- Use
.listener()in the axum example by @SabrinaJewson in #56 - Bump actions/checkout from 4 to 5 by @dependabot[bot] in #59
- feat: accept_generator fn by @tmccombs in #60
- Axum support by @tmccombs in #61
- chore: Prepare for 0.11.1 release by @tmccombs in #62
Full Changelog: v0.11.0...v0.11.1
Release notes
Open source →Features
-
Add listener() method
-
Accept_generator fn
-
Add AsyncListener trait
-
Axum support
-
0.11.016 Feb 2025Release notes
Open source →What's Changed
- Breaking change: Minimum supported version of tokio-rustls is 0.26
- Updated to edition 2021
Full Changelog: v0.10.3...v0.11.0
-
0.10.314 Jan 2025Release notes
Open source →What's Changed
- Update thiserror requirement from 1.0.30 to 2.0.3 by @dependabot in #48
- Doc fixes by @tmccombs in #50
- Auto publish by @tmccombs in #51
Full Changelog: v0.10.2...v0.10.3-1
-
0.10.231 Oct 2024Release notes
Open source →What's Changed
- Stop automatically pulling in aws-lc as a dependency by @OverShifted in #46
New Contributors
- @OverShifted made their first contribution in #46
Full Changelog: v0.10.1...v0.10.2
-
0.10.106 Jul 2024Release notes
Open source → -
0.10.015 Mar 2024Release notes
Open source →Security Advisory
Versions prior to this using the default configuration are vulnerable to a Slowloris attack.
This version mitigates the vulnerability.
Previous versions can mitigate the vulnerability by increasing the value passed to
Builder::max_handshakesto a large
number (such asusize::MAX). Decreasing thehandshake_timeoutcan also help, although it is still strongly recommended
to increase themax_handshakesmore than the current default.Changes
- [breaking] Change
poll_acceptnot to have a limit on the number of pending handshakes in the queue,
so that connections that are not making progress towards completing the handshake will not block other
connections from being accepted. This replacesBuilder::max_handshakeswithBuilder::accept_batch_size.
Release notes
Open source →Security Advisory
Versions prior to this using the default configuration are vulnerable to a Slowloris attack.
This version mitigates the vulnerability.
Previous versions can mitigate the vulnerability by increasing the value passed to
Builder::max_handshakesto a large number (such asusize::MAX). Decreasing thehandshake_timeoutcan also help, although it is still strongly recommended to increase themax_handshakesmore than the current default.Changes
- [breaking] Change
poll_acceptnot to have a limit on the number of pending handshakes in the queue, so that connections that are not making progress towards completing the handshake will not block other connections from being accepted. This replacesBuilder::max_handshakeswithBuilder::accept_batch_size.
- [breaking] Change
-
0.9.123 Dec 2023 -
0.9.005 Dec 2023Release notes
Open source →Features
- [breaking] Remove until & remove option from accept
- BREAKING CHANGE: remove
untilfrom AsyncAccept trait. UseStreamExt.take_untilon the TlsListener instead. - BREAKING CHANGE:
acceptfn on AsyncAccept trait no longer returns an Option - BREAKING CHANGE:
acceptfn on TlsListener no longer returns an Option
- BREAKING CHANGE: remove
Upgrade
- [breaking] Update to hyper 1.0
- BREAKING CHANGE: Removed hyper-h1 and hyper-h2 features
- [breaking] Remove until & remove option from accept
-
0.8.019 Oct 2023Release notes
Open source →This is a backwards incompatible release. The main change is that accepting a new connection now returns a tuple of the new connection, and the peer address. The
AsyncAccepttrait was also changed similarly. TheErrorenum was also changed to provide more details about the error. And if the handshake times out, it now returns an error instead of silently waiting for the next connection.Features
-
[breaking] Add a new error type for handshake timeouts
- BREAKING CHANGE: Adds a new variant to the Error Enum
- BREAKING CHANGE: The Error enum is now non_exhaustive
- BREAKING CHANGE: Now returns an error if a handshake times out
-
[breaking] Yield remote address upon accepting a connection, and include it in errors.
- BREAKING CHANGE: The enum variant
Error::ListenerErroris now struct-like instead of tuple-like, and isnon_exhaustivelike the enum itself. - BREAKING CHANGE:
Errornow has three type parameters, not two. - BREAKING CHANGE:
TlsListener::acceptand<TlsListener as Stream>::nextyields a tuple of (connection, remote address), not just the connection. - BREAKING CHANGE:
AsyncAcceptnow has an associated typeAddress, whichpoll_acceptmust now return along with the accepted connection.
- BREAKING CHANGE: The enum variant
-
[breaking] More changes for including peer address in response
- BREAKING CHANGE: AsyncAccept::Error must implement std::error::Error
- BREAKING CHANGE: TlsAcceptError is now a struct form variant.
-
-
0.7.001 Apr 2023 -
0.6.030 Dec 2022Release notes
Open source →Added
- Added additional tests and examples
- Re-export tls engine crates as public modules.
Changed
- Increased default handshake timeout to 10 seconds (technically a breaking change)
-
0.5.122 Mar 2022Release notes
Open source →Added
- Support for
openssl
Fixed
- Fixed compilation on non-unix environments, where tokio-net doesn't include unix sockets
SpawningHandshakeswill abort the tasks for pending connections when the linked futures are dropped. This should allow timeouts to cause the connectionto be closed.
- Support for
-
0.5.020 Mar 2022Release notes
Open source →Added
- Added [
AsyncAccept::until] method, that creates a newAsyncAcceptthat will stop accepting connections after another future finishes. - Added
hypersubmodule to add additional support for hyper. Specifically, a newtype for the hyperAccepttrait forAsyncAccept. - Added
SpawningHandshakesstruct behind thertfeature flag. This allows you to perform multiple handshakes in parallel with a multi-threaded runtime.
Changed
- Backwards incompatible:
AsyncAccept::poll_acceptnow returns,Poll<Option<Result<...>>>instead ofPoll<Result<...>>. This allows the incoming stream of connections to stop, for example, if a graceful shutdown has been initiated.impls provided by this crate have been updated, but custom implementations ofAsyncAccept, or direct usage of the trait may break. - Removed unnecessary type bounds (see #14). Potentially a breaking change, although I'd be suprised if any real code was affected.
- Added [
-
0.4.320 Mar 2022Release notes
Open source →- Added
TlsListener::replace_accept_pin()function to allow replacing the listener certificate at runtime, when the listener is pinned.
- Added
-
0.4.213 Mar 2022Release notes
Open source →Added
- Added
TlsListener::replace_acceptor()function to allow replacing the listener certificate at runtime.
- Added
-
0.4.109 Mar 2022Release notes
Open source →Changed
- The implementation of
AsyncTlsfortokio_native_tls::TlsAcceptornow requires the connection type to implementSend. This in turn allowsTlsListenerto beSendwhen using thenative-tlsfeature. Technically, this is a breaking change. However, in practice it is unlikely to break existing code and makes usingTlsListenermuch easier to use whennative-tlsis enabled.
- The implementation of
-
0.4.024 Feb 2022Release notes
Open source →NOTE: This release contains several breaking changes.
Added
- Support for
native-tls.
Changed
- The TLS backend is now configurable. Both rustls and native-tls are supported. Other backends can also be used by implementing the
AsyncTlstrait.- You must now supply either the
rustlsornative-tlsfeatures to get support for a tls backend. - Unfortunately, the machinery for this required adding an additional type parameter to
TlsListener.
- You must now supply either the
- The
TlsListenerstream now returns atls_listener::Errorinstead ofstd::io::Errortype. - Signatures of
TcpListener::new()andbuilder()have changed to now take an argument of the TLS type rather than arustls::ServerConfig, to update existing calls, replacebuilder(config)withbuilder(Arc::new(config).into()).
Fixed
- Crate will now compile when linked against a target that doesn't explicitly enable the
tokio/timeandhyper/tcpfeatures.
- Support for
-
0.3.019 Jan 2022Nothing published for this version
-
0.2.105 Jan 2021Nothing published for this version
-
0.2.002 Jan 2021Nothing published for this version
-
0.1.104 Feb 2019Nothing published for this version
-
0.1.001 Feb 2019Nothing published for this version