net/lib.rs
1// SPDX-License-Identifier: AGPL-3.0-only
2//! **net** — hand-rolled transport primitives shared by the `mcp` crate and
3//! agentd's intel client. One blocking HTTP/1.1 client over any `Read + Write`
4//! (the single highest-leverage minimalism decision — avoids the url→IDNA→ICU and
5//! async-runtime taxes) with buffered + streaming/SSE request paths, plus
6//! unix-socket and the feature-gated tls/vsock connects, and an SSRF egress
7//! classifier. Deliberately serde-free: nothing here parses a payload, so the
8//! transport layer adds no deserialization attack surface.
9
10pub mod http;
11pub mod ssrf;
12pub mod unixsock;
13
14#[cfg(feature = "tls")]
15pub mod tls;
16
17// A minimal X.509 field extractor (subject CN + SANs) that surfaces an mTLS
18// peer's already-verified identity for principal matching. Only needed under
19// TLS; pure DER parsing, no new dependency.
20#[cfg(feature = "tls")]
21pub mod x509;
22
23#[cfg(feature = "vsock")]
24pub mod vsock;