[package]
edition = "2024"
rust-version = "1.96"
name = "leyline-http"
version = "0.1.5"
authors = ["Thomas Gardiner <thomas@manaforge.tech>"]
build = "build.rs"
exclude = ["profiles/captures/"]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "HTTP client that impersonates Chrome, Firefox, and Safari on the wire: TLS (JA3/JA4), HTTP/2, and HTTP/3 fingerprints"
homepage = "https://github.com/manaforged/leyline-http"
documentation = "https://docs.rs/leyline-http"
readme = "README.md"
keywords = [
"tls",
"fingerprint",
"http",
"browser",
"ja4",
]
categories = [
"web-programming::http-client",
"cryptography",
]
license = "MIT"
repository = "https://github.com/manaforged/leyline-http"
resolver = "2"
[package.metadata.cargo_check_external_types]
allowed_external_types = [
"http",
"http::*",
"bytes::*",
"serde_core::*",
"serde_json::*",
"futures_core::*",
"url::*",
"tokio::io::async_write::AsyncWrite",
"tower_service::*",
]
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
features = ["full"]
[package.metadata.cargo-machete]
ignore = ["md-5"]
[features]
bench-internals = []
charset = ["dep:encoding_rs"]
compression-brotli = ["dep:brotli"]
compression-deflate = ["dep:flate2"]
compression-gzip = ["dep:flate2"]
compression-zstd = ["dep:zstd"]
default = [
"charset",
"compression-gzip",
"compression-brotli",
"compression-deflate",
"compression-zstd",
"multipart",
"websocket",
"http3",
"html",
]
full = [
"compression-gzip",
"compression-brotli",
"compression-deflate",
"compression-zstd",
"multipart",
"websocket",
"http3",
"tower",
"socks",
"charset",
"html",
]
html = ["multipart"]
http3 = ["dep:leyline-quiche"]
multipart = []
socks = []
test-util = []
tower = ["dep:tower-service"]
websocket = ["dep:tokio-tungstenite"]
[lib]
name = "leyline"
path = "src/lib.rs"
[[example]]
name = "api_client"
path = "examples/api_client.rs"
[[example]]
name = "audit"
path = "examples/audit.rs"
[[example]]
name = "browser_tab"
path = "examples/browser_tab.rs"
required-features = ["html"]
[[example]]
name = "concurrent"
path = "examples/concurrent.rs"
[[example]]
name = "cookies"
path = "examples/cookies.rs"
[[example]]
name = "crawler"
path = "examples/crawler.rs"
[[example]]
name = "device"
path = "examples/device.rs"
required-features = ["html"]
[[example]]
name = "download"
path = "examples/download.rs"
[[example]]
name = "headers"
path = "examples/headers.rs"
[[example]]
name = "http3"
path = "examples/http3.rs"
required-features = ["http3"]
[[example]]
name = "multipart"
path = "examples/multipart.rs"
required-features = ["multipart"]
[[example]]
name = "oneliner"
path = "examples/oneliner.rs"
[[example]]
name = "post_json"
path = "examples/post_json.rs"
[[example]]
name = "presets"
path = "examples/presets.rs"
[[example]]
name = "retry"
path = "examples/retry.rs"
[[example]]
name = "stock_monitor"
path = "examples/stock_monitor.rs"
[[example]]
name = "streaming"
path = "examples/streaming.rs"
[[example]]
name = "trace"
path = "examples/trace.rs"
[[example]]
name = "websocket"
path = "examples/websocket.rs"
required-features = ["websocket"]
[[test]]
name = "env_proxy_fail_closed"
path = "tests/env_proxy_fail_closed.rs"
[[test]]
name = "env_socks_proxy"
path = "tests/env_socks_proxy.rs"
[[test]]
name = "it"
path = "tests/it/main.rs"
[[test]]
name = "soak"
path = "tests/soak.rs"
[[test]]
name = "tls_behaviour"
path = "tests/tls_behaviour.rs"
[[test]]
name = "tls_trust_scope"
path = "tests/tls_trust_scope.rs"
required-features = ["bench-internals"]
[dependencies.base64]
version = "0.22"
[dependencies.brotli]
version = "8.0.2"
optional = true
[dependencies.bytes]
version = "1.9.0"
[dependencies.encoding_rs]
version = "0.8"
optional = true
[dependencies.flate2]
version = "1.1"
features = ["zlib-rs"]
optional = true
default-features = false
[dependencies.futures-util]
version = "0.3"
[dependencies.hex]
version = "0.4"
[dependencies.http]
version = "1"
[dependencies.leyline-bssl]
version = "=0.1.5"
[dependencies.leyline-bssl-tokio]
version = "=0.1.5"
[dependencies.leyline-quiche]
version = "=0.1.5"
features = ["boringssl-bssl-crate"]
optional = true
default-features = false
[dependencies.libc]
version = "0.2.185"
[dependencies.lru]
version = "0.18"
[dependencies.md-5]
version = "0.10"
[dependencies.psl]
version = "2.1"
[dependencies.rand]
version = "0.9"
[dependencies.serde]
version = "1.0.145"
features = ["derive"]
[dependencies.serde_json]
version = "1"
[dependencies.sha2]
version = "0.10"
[dependencies.socket2]
version = "0.6"
features = ["all"]
[dependencies.thiserror]
version = "2.0.7"
[dependencies.tokio]
version = "1.37"
features = [
"net",
"rt",
"time",
"io-util",
"net",
"rt",
"time",
"io-util",
"macros",
"fs",
"sync",
]
[dependencies.tokio-tungstenite]
version = "0.26"
optional = true
[dependencies.tokio-util]
version = "0.7.5"
features = ["io"]
[dependencies.toml]
version = "0.9"
features = [
"parse",
"serde",
"std",
]
default-features = false
[dependencies.tower-service]
version = "0.3"
optional = true
[dependencies.tracing]
version = "0.1.36"
[dependencies.url]
version = "2"
features = ["serde"]
[dependencies.zstd]
version = "0.13"
optional = true
[dev-dependencies.base64]
version = "0.22"
[dev-dependencies.brotli]
version = "8.0.2"
[dev-dependencies.bytes]
version = "1.9.0"
[dev-dependencies.flate2]
version = "1.1"
features = ["zlib-rs"]
default-features = false
[dev-dependencies.futures-util]
version = "0.3"
[dev-dependencies.leyline-bssl]
version = "=0.1.5"
[dev-dependencies.leyline-bssl-tokio]
version = "=0.1.5"
[dev-dependencies.leyline-quiche]
version = "=0.1.5"
features = [
"boringssl-bssl-crate",
"internal",
]
default-features = false
[dev-dependencies.serde_json]
version = "1"
[dev-dependencies.tokio]
version = "1.37"
features = [
"net",
"rt",
"time",
"io-util",
"full",
"test-util",
]
[dev-dependencies.tokio-util]
version = "0.7.5"
features = ["io"]
[dev-dependencies.url]
version = "2"
[dev-dependencies.zstd]
version = "0.13"
[build-dependencies.serde]
version = "1.0.145"
features = ["derive"]
[build-dependencies.toml]
version = "0.9"
features = [
"parse",
"serde",
"std",
]
default-features = false
[target."cfg(windows)".dependencies.windows-sys]
version = "0.61"
features = [
"Win32_Security_Cryptography",
"Win32_Foundation",
]
[lints.clippy]
allow_attributes_without_reason = "deny"
assertions_on_result_states = "deny"
dbg_macro = "deny"
get_unwrap = "deny"
ignore_without_reason = "deny"
let_underscore_future = "deny"
let_underscore_lock = "deny"
let_underscore_must_use = "deny"
map_err_ignore = "deny"
rc_mutex = "deny"
should_panic_without_expect = "deny"
todo = "deny"
undocumented_unsafe_blocks = "deny"
unimplemented = "deny"
unused_result_ok = "deny"
unwrap_in_result = "deny"
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(leyline_unstable_bssl)"]