[package]
edition = "2024"
rust-version = "1.86"
name = "hypertor"
version = "0.2.2"
authors = ["hupe1980"]
build = false
publish = true
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Tor HTTP client and onion service library with Python bindings"
readme = "README.md"
keywords = [
"tor",
"http",
"privacy",
"anonymity",
"onion",
]
categories = [
"network-programming",
"web-programming::http-client",
]
license = "MIT"
repository = "https://github.com/hupe1980/hypertor"
[features]
client = []
default = [
"rustls",
"client",
]
full = [
"client",
"server",
"intercept",
"rustls",
"http2",
"padding",
"python",
]
http2 = []
intercept = []
native-tls = [
"dep:tokio-native-tls",
"arti-client/native-tls",
"tor-rtcompat/native-tls",
"tokio-tungstenite/native-tls",
]
padding = []
python = [
"dep:pyo3",
"dep:pyo3-async-runtimes",
]
rustls = [
"dep:tokio-rustls",
"dep:rustls-native-certs",
"arti-client/rustls",
"tor-rtcompat/rustls",
"tokio-tungstenite/rustls-tls-webpki-roots",
]
server = []
static-sqlite = ["arti-client/static-sqlite"]
[lib]
name = "hypertor"
crate-type = [
"cdylib",
"rlib",
]
path = "src/lib.rs"
[[example]]
name = "basic_usage"
path = "examples/basic_usage.rs"
[[example]]
name = "multiple_identities"
path = "examples/multiple_identities.rs"
[[example]]
name = "onion_service"
path = "examples/onion_service.rs"
required-features = ["server"]
[[example]]
name = "realtime_patterns"
path = "examples/realtime_patterns.rs"
[[example]]
name = "secure_api_client"
path = "examples/secure_api_client.rs"
[[example]]
name = "security_features"
path = "examples/security_features.rs"
[[example]]
name = "socks_proxy"
path = "examples/socks_proxy.rs"
[[test]]
name = "integration"
path = "tests/integration.rs"
[[test]]
name = "security"
path = "tests/security.rs"
[[bench]]
name = "benchmarks"
path = "benches/benchmarks.rs"
harness = false
[dependencies.arti-client]
version = "0.38"
features = [
"tokio",
"compression",
"onion-service-client",
"onion-service-service",
"pt-client",
"bridge-client",
"vanguards",
"keymgr",
"restricted-discovery",
"hs-pow-full",
"geoip",
]
default-features = false
[dependencies.base64]
version = "0.22"
[dependencies.bitflags]
version = "2.10"
[dependencies.brotli]
version = "8"
[dependencies.bytes]
version = "1"
[dependencies.chrono]
version = "0.4.43"
features = ["serde"]
[dependencies.flate2]
version = "1.1"
[dependencies.futures]
version = "0.3"
[dependencies.http]
version = "1.2"
[dependencies.http-body]
version = "1"
[dependencies.http-body-util]
version = "0.1"
[dependencies.hyper]
version = "1.8"
features = [
"http1",
"http2",
"client",
]
[dependencies.hyper-util]
version = "0.1.19"
features = [
"tokio",
"client-legacy",
]
[dependencies.mime_guess]
version = "2.0"
[dependencies.parking_lot]
version = "0.12.5"
[dependencies.pin-project-lite]
version = "0.2"
[dependencies.pyo3]
version = "0.27"
features = ["extension-module"]
optional = true
[dependencies.pyo3-async-runtimes]
version = "0.27"
features = ["tokio-runtime"]
optional = true
[dependencies.rand]
version = "0.8"
[dependencies.rustls-native-certs]
version = "0.8"
optional = true
[dependencies.safelog]
version = "0.7"
[dependencies.serde]
version = "1.0.228"
features = ["derive"]
[dependencies.serde_json]
version = "1.0.149"
[dependencies.sha1]
version = "0.10"
[dependencies.thiserror]
version = "2.0.18"
[dependencies.tokio]
version = "1"
features = [
"rt-multi-thread",
"macros",
"time",
"sync",
"net",
"io-util",
]
[dependencies.tokio-native-tls]
version = "0.3"
optional = true
[dependencies.tokio-rustls]
version = "0.26"
features = ["ring"]
optional = true
[dependencies.tokio-stream]
version = "0.1"
[dependencies.tokio-tungstenite]
version = "0.28"
default-features = false
[dependencies.tor-cell]
version = "0.38"
[dependencies.tor-config]
version = "0.38"
[dependencies.tor-guardmgr]
version = "0.38"
[dependencies.tor-hscrypto]
version = "0.38"
[dependencies.tor-hsservice]
version = "0.38"
features = ["restricted-discovery"]
default-features = false
[dependencies.tor-keymgr]
version = "0.38"
[dependencies.tor-proto]
version = "0.38"
[dependencies.tor-rtcompat]
version = "0.38"
features = ["tokio"]
default-features = false
[dependencies.tracing]
version = "0.1"
[dependencies.tungstenite]
version = "0.28"
[dependencies.urlencoding]
version = "2.1"
[dependencies.zeroize]
version = "1.8"
features = ["derive"]
[dependencies.zstd]
version = "0.13.3"
[dev-dependencies.criterion]
version = "0.8"
features = ["html_reports"]
[dev-dependencies.tokio-test]
version = "0.4"
[dev-dependencies.tracing-subscriber]
version = "0.3.22"
features = ["env-filter"]
[profile.release]
lto = true
codegen-units = 1
panic = "abort"
strip = true