[package] name = "cfsolve" version = "0.1.0" edition = "2024" license = "MIT" default-run = "cfsolve" autotests = false # Without default features, the library is the solver alone: `Browser`, `Options`, `Outcome` # and `Error`. The tools in this repository use the rest. [features] default = ["internals"] # The analysis modules behind the solver (deobfuscation, the VM, payloads, and transport), and # the capture proxy, which records the challenge payloads a real browser sends. internals = [ "dep:bytes", "dep:http-body-util", "dep:hyper", "dep:hyper-util", "dep:rcgen", "dep:rustls", "dep:rustls-native-certs", "dep:tokio-rustls", ] [dependencies] anyhow = "1.0.104" base64 = "0.22.1" chrono = "0.4.42" ego-tree = "0.11.0" getrandom = "0.4.3" html5ever = "0.39.0" # Payload fields keep the order the challenge program builds them in. indexmap = { version = "2", features = ["serde"] } iana-time-zone = "0.1.64" # `CLOCK_MONOTONIC`, the time base Chrome's `performance.now()` is derived from. libc = "0.2.189" num-bigint = "0.4.6" # A returned program's payload can hold a capture of `RegExp(...).exec(...)`. regex = "1.12.2" ryu-js = "1.0.2" # Fast hashing for the VM interpreter's identifier and register maps. rustc-hash = "2.1.1" # `deterministic` keeps attributes in source order, which the page fingerprint # reports verbatim. scraper = { version = "0.27.0", features = ["deterministic"] } serde = { version = "1.0.228", features = ["derive"] } # Browser measurements must retain the exact doubles produced by JSON.parse. serde_json = { version = "1.0.151", features = ["float_roundtrip", "preserve_order"] } sha2 = "0.10.9" # No default features: the linter and TypeScript declaration emit are unused. swc = { version = "52.0.0", default-features = false } swc_core = { version = "54.0.0", features = ["common", "ecma_ast", "ecma_visit", "ecma_codegen", "ecma_parser"] } swc_ecma_transforms = "44.0.0" swc_ecma_utils = "25.0.0" tokio = { version = "1.53.1", features = ["macros", "net", "rt-multi-thread", "sync", "time", "io-util", "signal"] } url = "2.5.8" # `Url` leaves an upstream proxy's credentials percent-encoded. percent-encoding = "2.3.2" wreq = { version = "=0.16.1", features = ["cookies", "gzip", "brotli", "deflate", "zstd", "socks", "ws"] } rustls-native-certs = { version = "0.8", optional = true } wreq-util = { version = "0.2.0", features = ["emulation-serde", "emulation-compression"] } # The UI audit's keyframe text, spelled as each engine serializes it. cssparser = "0.37" flate2 = "1.1.10" brotli = "8.0.4" zstd = "0.13.3" # The capture proxy: TLS interception and HTTP serving on the MITM leg. hyper = { version = "1", features = ["server", "http1", "http2"], optional = true } hyper-util = { version = "0.1", default-features = false, features = ["tokio"], optional = true } bytes = { version = "1", optional = true } http-body-util = { version = "0.1", optional = true } rustls = { version = "0.23", default-features = false, features = ["std", "tls12", "logging", "ring"], optional = true } tokio-rustls = { version = "0.26", default-features = false, features = ["logging", "tls12", "ring"], optional = true } rcgen = { version = "0.14", features = ["x509-parser"], optional = true } # Chrome 154's ClientHello: ML-DSA and GREASE signature algorithms and the # trust_anchors extension, which the published crates cannot send. See the # "cfsolve patch" comments in vendor/. [patch.crates-io] btls-sys = { path = "vendor/btls-sys" } wreq = { path = "vendor/wreq" } http2 = { path = "vendor/http2" } # Full debug info for swc dominates link time and target/ size. Line tables # keep file:line in this crate's backtraces; dependencies get none. [profile.dev] debug = "line-tables-only" [profile.dev.package."*"] debug = false