Stream

Blocking stream and TLS utils for the Pimalaya io- protocol crates and their consumers
This crate opens and upgrades the blocking streams the io- protocol clients run on: TCP connections, TLS connections, Unix-domain sockets, proxy resolution and the plain-to-TLS upgrade STARTTLS flows need. It is public, and meant for anyone building a client on io-imap, io-smtp, io-http or a sibling, not only for Pimalaya's own products. Reusing it is the supported path, reimplementing TCP, TLS, proxy resolution and the STARTTLS upgrade is not.
[!NOTE] The crate stays on 0.x, which means breaking changes land in minor bumps and never in patch bumps. Pin a minor version and read the changelog before upgrading.
Table of contents
Features
- Blocking stream: one handle wrapping a TCP socket, a Unix-domain socket or a TLS session, with the plain-to-TLS upgrade STARTTLS flows need (requires
stdfeature). - Proxy: every connect can tunnel through a SOCKS5 or HTTP
CONNECTproxy, resolved from the ambient proxy environment variables by default (requiresstdfeature). - TLS support:
- Rustls with ring crypto (requires
rustls-ringfeature, enabled by default) - Rustls with aws crypto (requires
rustls-awsfeature) - Native TLS (requires
native-tlsfeature)
- Rustls with ring crypto (requires
[!TIP] pimalaya-stream is written in Rust and uses cargo features to gate TLS providers. The default feature set is declared in Cargo.toml or on docs.rs.
Usage
The whole API is documented on docs.rs; the io- protocol crates and their std clients are its real-world consumers.
License
This project is licensed under either of:
Social
- Chat on Matrix
- News on Mastodon or RSS
- Mail at pimalaya.org@posteo.net
Sponsoring
Special thanks to the NLnet foundation and the European Commission that have been financially supporting the project for years:
- 2022 → 2023: NGI Assure
- 2023 → 2024: NGI Zero Entrust
- 2024 → 2026: NGI Zero Core
- 2026 → 2027: NGI Zero Commons Fund
This program is part of Pimalaya, free software funded entirely by grants and donations. If you find it useful, consider sponsoring its development:
