[package]
name = "ngrok"
version = "0.19.0"
edition = "2024"
license = "MIT OR Apache-2.0"
description = "The ngrok agent SDK"
repository = "https://github.com/ngrok/ngrok-rust"

[dependencies]
arc-swap = "1.5.2"
async-trait = "0.1.59"
awaitdrop = "0.1.1"
axum = { version = "0.7.4", features = ["tokio"], optional = true }
axum-core = "0.4.3"

base64 = "0.21.7"
bitflags = "2.4.2"
bytes = "1.10.1"

futures = "0.3.25"
futures-rustls = { version = "0.26.0", default-features = false, features = ["tls12", "logging"] }
futures-util = "0.3.30"
hostname = "0.3.1"
hyper = { version = "^1.1.0", optional = true }
hyper-http-proxy = "1.1.0"
hyper-util = { version = "0.1.3", features = ["tokio"] }
once_cell = "1.17.1"
muxado = { path = "../muxado", version = "0.5" }
pin-project = "1.1.3"
parking_lot = "0.12.1"
proxy-protocol = "0.5.0"
regex = "1.7.3"
rustls-native-certs = "0.7.0"
rustls-pemfile = "2.0.0"
serde = { version = "1.0.149", features = ["derive"] }
serde_json = "1.0.89"
thiserror = "2"
tokio = { version = "1.23.0", features = [
	"io-util",
	"net",
	"sync",
	"time",
	"rt",
] }
# 0.3.2 introduced RetryIf::start(), which session.rs uses; declare it as the minimum.
tokio-retry = "0.3.2"
tokio-socks = "0.5.1"
tokio-util = { version = "0.7.4", features = ["compat"] }
tower-service = { version = "0.3.3"}
tracing = "0.1.37"
url = "2.4.0"

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.45.0", features = ["Win32_Foundation"] }

[dev-dependencies]
anyhow = "1.0.66"
axum = { version = "0.7.4", features = ["tokio"] }
flate2 = "1.0.25"
http-body-util = "0.1.3"
hyper = { version = "1.1.0", features = [ "client" ] }
hyper-util = { version = "0.1.3", features = [
	"tokio",
	"server",
	"http1",
	"http2",
]}
paste = "1.0.11"
rand = "0.8.5"
reqwest = "0.12"
tokio = { version = "1.23.0", features = ["full"] }
tokio-tungstenite = { version = "0.26.2", features = [
	"rustls",
	"rustls-tls-webpki-roots",
] }
tower = { version = "0.5", features = ["util"] }
tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
tracing-test = "0.2.3"

[[example]]
name = "tls"
required-features = ["axum"]

[[example]]
name = "axum"
required-features = ["axum"]

[[example]]
name = "labeled"
required-features = ["axum"]

[[example]]
name = "mingrok"
required-features = ["hyper"]

[features]
default = ["aws-lc-rs"]
hyper = ["hyper/server", "hyper/http1",  "dep:hyper"]
axum = ["dep:axum", "hyper"]
online-tests = ["axum", "hyper"]
long-tests = ["online-tests"]
authenticated-tests = ["online-tests"]
paid-tests = ["authenticated-tests"]
aws-lc-rs = ["futures-rustls/aws-lc-rs"]
ring = ["futures-rustls/ring"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
