[package]
name = "guess"
version = "0.2.1"
categories = ["network-programming", "parser-implementations"]
edition.workspace = true
keywords = ["protocol", "detection", "tls", "http", "sniff"]
license.workspace = true
readme = "README.md"
repository.workspace = true
rust-version.workspace = true
description = "Classify a TCP stream's first bytes as TLS / HTTP/2 / HTTP/1 / unknown."

[lints]
workspace = true

[features]
default = ["classify"]
# Cascade that uses rustls's Acceptor + a memchr HTTP/1 request-line scanner.
# Disable when only the result types are needed (describe-without-peek).
classify = ["dep:rustls", "dep:memchr"]

[dependencies]
bytes = "1"

# Classify path — gated.
memchr = { version = "2", optional = true }
rustls = { version = "0.23", default-features = false, features = ["std"], optional = true }

[dev-dependencies]
# Tests build real ClientHello bytes; aws-lc-rs is dev-only (pure-Rust-ish, no system dep).
# Runtime dep above stays backend-agnostic.
rustls = { version = "0.23", default-features = false, features = ["std", "aws-lc-rs"] }
