[package]
edition = "2024"
name = "hpx"
version = "2.5.12"
authors = ["Akagi201 <akagi201@gmail.com>"]
build = false
include = [
"README.md",
"LICENSE",
"src/**/*.rs",
"src/**/*.dat",
"examples/**/*.rs",
"tests/**/*.rs",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "High Performance HTTP Client"
readme = "README.md"
keywords = [
"http",
"client",
"websocket",
"exchange",
"crypto",
]
categories = ["web-programming::http-client"]
license = "Apache-2.0"
repository = "https://github.com/longcipher/hpx"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
targets = ["x86_64-unknown-linux-gnu"]
[features]
auth = ["dep:async-trait"]
boring-tls = [
"dep:boring",
"dep:tokio-boring",
"dep:brotli",
"dep:flate2",
]
boring-vendored = [
"boring-tls",
"boring/fips",
]
brotli = ["tower-http/decompression-br"]
charset = [
"dep:encoding_rs",
"dep:mime",
]
cookies = [
"dep:cookie",
"dep:arc-swap",
"dep:scc",
"dep:publicsuffix",
]
default = [
"boring-tls",
"http1",
"http2",
"stream",
"tracing",
]
deflate = ["tower-http/decompression-deflate"]
form = [
"dep:serde",
"dep:serde_urlencoded",
]
gzip = ["tower-http/decompression-gzip"]
hft = [
"auth",
"boring-tls",
"hickory-dns",
"http1",
"http2",
"simd-json",
"stream",
"tracing",
"ws-yawc",
"zstd",
]
hickory-dns = ["dep:hickory-resolver"]
hotpath = ["dep:hotpath"]
http1 = [
"dep:httparse",
"dep:smallvec",
"tracing",
"stream",
]
http2 = ["dep:http2"]
http3 = [
"dep:quinn",
"dep:hpx-h3",
"hpx-h3/quinn",
"rustls-tls-quic",
"dep:scc",
]
json = [
"dep:serde",
"dep:serde_json",
]
keylog = ["dep:scc"]
macros = ["tokio/macros"]
multipart = [
"dep:mime_guess",
"dep:sync_wrapper",
]
openssl-tls = [
"dep:openssl",
"dep:tokio-openssl",
]
openssl-vendored = [
"openssl-tls",
"openssl/vendored",
]
query = [
"dep:serde",
"dep:serde_urlencoded",
]
rustls-tls = [
"dep:rustls",
"dep:tokio-rustls",
"dep:rustls-pki-types",
"dep:webpki-root-certs",
"dep:rustls-pemfile",
"dep:const-oid",
"dep:der",
"dep:hmac",
"dep:pkcs12",
"dep:pkcs8",
"dep:sha1",
"dep:sha2",
]
rustls-tls-quic = ["rustls-tls"]
simd-json = [
"json",
"dep:simd-json",
]
socks = [
"dep:tokio-socks",
"hpx-yawc/socks",
]
sse = [
"dep:memchr",
"dep:fastrand",
"stream",
]
stealth = [
"auth",
"boring-tls",
"brotli",
"charset",
"cookies",
"deflate",
"gzip",
"hickory-dns",
"http1",
"http2",
"query",
"stream",
"tracing",
"ws-yawc",
"zstd",
]
stream = [
"tokio/fs",
"dep:tokio-util",
"dep:sync_wrapper",
]
system-proxy = [
"dep:system-configuration",
"dep:windows-registry",
]
tracing = [
"http2/tracing",
"dep:tracing",
]
webpki-roots = ["dep:webpki-root-certs"]
ws = [
"ws-yawc",
"dep:flate2",
]
ws-yawc = [
"dep:hpx-yawc",
"hpx-yawc/proxy",
]
zstd = ["tower-http/decompression-zstd"]
[lib]
name = "hpx"
path = "src/lib.rs"
[[example]]
name = "cert_store"
path = "examples/cert_store.rs"
required-features = ["webpki-roots"]
[[example]]
name = "check_peet"
path = "examples/check_peet.rs"
[[example]]
name = "connect_via_lower_priority_tokio_runtime"
path = "examples/connect_via_lower_priority_tokio_runtime.rs"
required-features = ["tracing"]
[[example]]
name = "emulation"
path = "examples/emulation.rs"
required-features = [
"gzip",
"brotli",
"zstd",
"deflate",
"tracing",
]
[[example]]
name = "form"
path = "examples/form.rs"
required-features = ["form"]
[[example]]
name = "h3_simple"
path = "examples/h3_simple.rs"
required-features = ["http3"]
[[example]]
name = "http1_websocket"
path = "examples/http1_websocket.rs"
required-features = [
"ws",
"futures-util/std",
]
[[example]]
name = "http2_websocket"
path = "examples/http2_websocket.rs"
required-features = [
"ws",
"futures-util/std",
]
[[example]]
name = "http3_websocket"
path = "examples/http3_websocket.rs"
required-features = ["http3"]
[[example]]
name = "json_dynamic"
path = "examples/json_dynamic.rs"
required-features = ["json"]
[[example]]
name = "json_typed"
path = "examples/json_typed.rs"
required-features = ["json"]
[[example]]
name = "keylog"
path = "examples/keylog.rs"
required-features = ["keylog"]
[[example]]
name = "request_with_emulation"
path = "examples/request_with_emulation.rs"
required-features = [
"gzip",
"brotli",
"zstd",
"deflate",
"tracing",
]
[[example]]
name = "request_with_interface"
path = "examples/request_with_interface.rs"
[[example]]
name = "request_with_local_address"
path = "examples/request_with_local_address.rs"
[[example]]
name = "request_with_proxy"
path = "examples/request_with_proxy.rs"
required-features = ["socks"]
[[example]]
name = "request_with_redirect"
path = "examples/request_with_redirect.rs"
[[example]]
name = "request_with_version"
path = "examples/request_with_version.rs"
[[example]]
name = "tor_socks"
path = "examples/tor_socks.rs"
required-features = ["socks"]
[[example]]
name = "tower_delay"
path = "examples/tower_delay.rs"
[[example]]
name = "tower_jitter_delay"
path = "examples/tower_jitter_delay.rs"
[[example]]
name = "unix_socket"
path = "examples/unix_socket.rs"
[[test]]
name = "badssl"
path = "tests/badssl.rs"
[[test]]
name = "brotli"
path = "tests/brotli.rs"
required-features = [
"brotli",
"stream",
]
[[test]]
name = "client"
path = "tests/client.rs"
[[test]]
name = "connector_layers"
path = "tests/connector_layers.rs"
[[test]]
name = "cookie"
path = "tests/cookie.rs"
required-features = ["cookies"]
[[test]]
name = "deflate"
path = "tests/deflate.rs"
required-features = [
"deflate",
"stream",
]
[[test]]
name = "emulation"
path = "tests/emulation.rs"
[[test]]
name = "gzip"
path = "tests/gzip.rs"
required-features = [
"gzip",
"stream",
]
[[test]]
name = "hooks"
path = "tests/hooks.rs"
[[test]]
name = "http3"
path = "tests/http3.rs"
required-features = ["http3"]
[[test]]
name = "http3_integration"
path = "tests/http3_integration.rs"
required-features = ["http3"]
[[test]]
name = "layers"
path = "tests/layers.rs"
[[test]]
name = "multipart"
path = "tests/multipart.rs"
required-features = [
"multipart",
"stream",
]
[[test]]
name = "proxy"
path = "tests/proxy.rs"
[[test]]
name = "proxy_pool"
path = "tests/proxy_pool.rs"
[[test]]
name = "redirect"
path = "tests/redirect.rs"
[[test]]
name = "retry"
path = "tests/retry.rs"
[[test]]
name = "stack_and_alloc"
path = "tests/stack_and_alloc.rs"
[[test]]
name = "timeouts"
path = "tests/timeouts.rs"
[[test]]
name = "unix_socket"
path = "tests/unix_socket.rs"
[[test]]
name = "upgrade"
path = "tests/upgrade.rs"
[[test]]
name = "ws_yawc"
path = "tests/ws_yawc.rs"
[[test]]
name = "zstd"
path = "tests/zstd.rs"
required-features = [
"zstd",
"stream",
]
[dependencies.ahash]
version = "0.8.12"
[dependencies.arc-swap]
version = "1.9.2"
optional = true
[dependencies.async-trait]
version = "0.1.91"
optional = true
[dependencies.base64-simd]
version = "0.8.0"
[dependencies.boring]
version = "5.1.0"
optional = true
[dependencies.brotli]
version = "8.0.4"
optional = true
[dependencies.bytes]
version = "1.12.1"
[dependencies.const-oid]
version = "0.10.2"
features = ["db"]
optional = true
[dependencies.cookie]
version = "0.18.1"
optional = true
[dependencies.der]
version = "0.8.1"
features = [
"alloc",
"oid",
]
optional = true
[dependencies.encoding_rs]
version = "0.8.35"
optional = true
[dependencies.fastrand]
version = "2.5.0"
optional = true
[dependencies.flate2]
version = "1.1.9"
optional = true
[dependencies.futures-channel]
version = "0.3.33"
[dependencies.futures-util]
version = "0.3.33"
[dependencies.hickory-resolver]
version = "0.26.1"
optional = true
[dependencies.hmac]
version = "0.13.0"
optional = true
[dependencies.hotpath]
version = "0.21.5"
optional = true
[dependencies.hpx-h3]
version = "2.5.12"
optional = true
[dependencies.hpx-yawc]
version = "2.5.12"
optional = true
[dependencies.http]
version = "1.4.2"
[dependencies.http-body]
version = "1.1.0"
[dependencies.http-body-util]
version = "0.1.4"
[dependencies.http2]
version = "0.5.19"
features = ["unstable"]
optional = true
[dependencies.httparse]
version = "1.10.1"
optional = true
[dependencies.ipnet]
version = "2.12.0"
[dependencies.memchr]
version = "2.8.3"
optional = true
[dependencies.mime]
version = "0.3.17"
optional = true
[dependencies.mime_guess]
version = "2.0.5"
optional = true
[dependencies.moka]
version = "0.12"
features = ["sync"]
[dependencies.openssl]
version = "0.10.81"
optional = true
[dependencies.parking_lot]
version = "0.12.5"
[dependencies.percent-encoding]
version = "2.3.2"
[dependencies.pin-project-lite]
version = "0.2.17"
[dependencies.pkcs12]
version = "0.2.0-pre.0"
features = ["kdf"]
optional = true
[dependencies.pkcs8]
version = "0.11.0"
features = [
"3des",
"sha1-insecure",
]
optional = true
[dependencies.publicsuffix]
version = "2"
optional = true
[dependencies.quinn]
version = "0.11.11"
features = [
"runtime-tokio",
"rustls-ring",
]
optional = true
default-features = false
[dependencies.rand]
version = "0.10.2"
[dependencies.rustls]
version = "0.23.42"
features = [
"std",
"tls12",
"ring",
]
optional = true
[dependencies.rustls-pemfile]
version = "2.2.0"
optional = true
[dependencies.rustls-pki-types]
version = "1.15.1"
optional = true
[dependencies.scc]
version = "3.8.5"
optional = true
[dependencies.serde]
version = "1.0.229"
features = ["derive"]
optional = true
[dependencies.serde_json]
version = "1.0.151"
optional = true
[dependencies.serde_urlencoded]
version = "0.7.1"
optional = true
[dependencies.sha1]
version = "0.11.0"
optional = true
[dependencies.sha2]
version = "0.11.0"
optional = true
[dependencies.simd-json]
version = "0.17.3"
optional = true
[dependencies.smallvec]
version = "1.15.2"
features = [
"const_generics",
"const_new",
]
optional = true
[dependencies.socket2]
version = "0.6.5"
features = ["all"]
[dependencies.sync_wrapper]
version = "1.0.2"
features = ["futures"]
optional = true
[dependencies.tokio]
version = "1.53.1"
features = [
"net",
"time",
"rt",
"io-util",
"sync",
"macros",
]
[dependencies.tokio-boring]
version = "5.0.0"
optional = true
[dependencies.tokio-openssl]
version = "0.6.5"
optional = true
[dependencies.tokio-rustls]
version = "0.26.4"
features = ["ring"]
optional = true
[dependencies.tokio-socks]
version = "0.5.3"
optional = true
[dependencies.tokio-util]
version = "0.7.19"
features = ["io"]
optional = true
[dependencies.tower]
version = "0.5.3"
features = [
"timeout",
"util",
"retry",
]
[dependencies.tower-http]
version = "0.7.0"
optional = true
[dependencies.tracing]
version = "0.1.44"
features = ["std"]
optional = true
[dependencies.url]
version = "2.5.8"
[dependencies.want]
version = "0.3.1"
[dependencies.webpki-root-certs]
version = "1.0.9"
optional = true
[dev-dependencies.criterion]
version = "0.8.2"
[dev-dependencies.futures]
version = "0.3.33"
features = ["std"]
[dev-dependencies.hyper]
version = "1.11.0"
features = [
"http1",
"http2",
"server",
]
[dev-dependencies.hyper-util]
version = "0.1.20"
features = [
"http1",
"http2",
"server-auto",
"server-graceful",
"tokio",
]
[dev-dependencies.proptest]
version = "1.11.0"
[dev-dependencies.rcgen]
version = "0.14.8"
[dev-dependencies.serde]
version = "1.0.229"
features = ["derive"]
[dev-dependencies.tokio]
version = "1.53.1"
features = [
"macros",
"rt-multi-thread",
]
[dev-dependencies.tokio-test]
version = "0.4.5"
[dev-dependencies.tower]
version = "0.5.3"
features = ["limit"]
[dev-dependencies.tracing]
version = "0.1.44"
[dev-dependencies.tracing-subscriber]
version = "0.3.23"
[dev-dependencies.zstd]
version = "0.13.3"
[target.'cfg(target_os = "macos")'.dependencies.system-configuration]
version = "0.7.0"
optional = true
[target."cfg(unix)".dependencies.libc]
version = "0.2.189"
[target."cfg(windows)".dependencies.windows-registry]
version = "0.6.1"
optional = true
[lints.clippy]
allow_attributes = "deny"
as_ptr_cast_mut = "allow"
borrow_as_ptr = "warn"
branches_sharing_code = "warn"
case_sensitive_file_extension_comparisons = "allow"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
clear_with_drain = "warn"
cloned_instead_of_copied = "warn"
cognitive_complexity = "allow"
collection_is_never_read = "warn"
dbg_macro = "deny"
debug_assert_with_mut_call = "allow"
default_trait_access = "allow"
derive_partial_eq_without_eq = "warn"
doc_markdown = "allow"
empty_line_after_doc_comments = "warn"
empty_line_after_outer_attr = "warn"
enum_glob_use = "warn"
equatable_if_let = "warn"
expect_used = "deny"
explicit_into_iter_loop = "warn"
explicit_iter_loop = "warn"
fallible_impl_from = "allow"
flat_map_option = "warn"
fn_params_excessive_bools = "allow"
format_push_string = "allow"
future_not_send = "allow"
if_not_else = "warn"
if_then_some_else_none = "warn"
implicit_clone = "warn"
imprecise_flops = "warn"
items_after_statements = "allow"
iter_on_empty_collections = "warn"
iter_on_single_items = "warn"
iter_with_drain = "warn"
iter_without_into_iter = "warn"
large_stack_frames = "warn"
manual_assert = "warn"
manual_clamp = "warn"
manual_is_variant_and = "warn"
manual_let_else = "allow"
manual_string_new = "warn"
match_same_arms = "allow"
missing_const_for_fn = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
mutex_integer = "warn"
naive_bytecount = "warn"
needless_bitwise_bool = "warn"
needless_collect = "allow"
needless_continue = "warn"
needless_for_each = "warn"
needless_pass_by_ref_mut = "warn"
needless_pass_by_value = "allow"
no_effect_underscore_binding = "allow"
non_send_fields_in_send_ty = "allow"
nonstandard_macro_braces = "warn"
option_as_ref_cloned = "warn"
or_fun_call = "warn"
panic = "deny"
path_buf_push_overwrite = "warn"
print_stderr = "deny"
print_stdout = "deny"
read_zero_byte_vec = "warn"
redundant_clone = "warn"
redundant_closure_for_method_calls = "allow"
redundant_else = "warn"
redundant_pub_crate = "allow"
ref_option = "allow"
ref_option_ref = "allow"
result_large_err = "allow"
return_self_not_must_use = "allow"
significant_drop_in_scrutinee = "allow"
significant_drop_tightening = "allow"
similar_names = "allow"
single_char_pattern = "warn"
string_lit_as_bytes = "warn"
string_lit_chars_any = "warn"
struct_excessive_bools = "allow"
suboptimal_flops = "warn"
suspicious_operation_groupings = "warn"
todo = "deny"
too_long_first_doc_paragraph = "allow"
too_many_lines = "allow"
trailing_empty_array = "warn"
trait_duplication_in_bounds = "warn"
transmute_undefined_repr = "warn"
trivial_regex = "warn"
trivially_copy_pass_by_ref = "allow"
tuple_array_conversions = "warn"
type_repetition_in_bounds = "warn"
unimplemented = "deny"
uninhabited_references = "warn"
uninlined_format_args = "allow"
unnecessary_self_imports = "warn"
unnecessary_struct_initialization = "warn"
unnecessary_wraps = "allow"
unnested_or_patterns = "warn"
unused_async = "allow"
unused_peekable = "warn"
unused_rounding = "warn"
unwrap_used = "deny"
use_self = "warn"
used_underscore_binding = "allow"
useless_let_if_seq = "warn"
while_float = "warn"
zero_sized_map_values = "warn"
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
missing_debug_implementations = "warn"
missing_docs = "warn"
unreachable_pub = "warn"
unused_must_use = "deny"
[lints.rust.rust_2018_idioms]
level = "deny"
priority = -1
[lints.rustdoc]
all = "warn"