diff --git a/Cargo.lock b/Cargo.lock index c3bddeb..404616f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -914,6 +914,21 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +dependencies = [ + "futures-util", + "hyper", + "log", + "rustls", + "tokio", + "tokio-rustls", + "webpki", +] + [[package]] name = "hyper-tls" version = "0.5.0" @@ -1749,6 +1764,7 @@ dependencies = [ "http", "http-body", "hyper", + "hyper-rustls", "hyper-tls", "ipnet", "js-sys", @@ -1758,17 +1774,35 @@ dependencies = [ "native-tls", "percent-encoding", "pin-project-lite", + "rustls", "serde", "serde_urlencoded", "tokio", "tokio-native-tls", + "tokio-rustls", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots", "winreg", ] +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", +] + [[package]] name = "rmp" version = "0.8.10" @@ -1801,6 +1835,19 @@ dependencies = [ "serde", ] +[[package]] +name = "rustls" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" +dependencies = [ + "base64", + "log", + "ring", + "sct", + "webpki", +] + [[package]] name = "rusty_ulid" version = "0.10.1" @@ -1835,6 +1882,16 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "sct" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "security-framework" version = "2.2.0" @@ -1981,6 +2038,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + [[package]] name = "strsim" version = "0.8.0" @@ -2147,6 +2210,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +dependencies = [ + "rustls", + "tokio", + "webpki", +] + [[package]] name = "tokio-stream" version = "0.1.5" @@ -2335,6 +2409,12 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "uom" version = "0.30.0" @@ -2482,6 +2562,25 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki" +version = "0.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "webpki-roots" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" +dependencies = [ + "webpki", +] + [[package]] name = "wepoll-sys" version = "3.0.1" diff --git a/Cargo.toml b/Cargo.toml index 82591a2..054dc26 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,6 @@ exclude = [ anyhow = "1.0.38" blake3 = "0.3.7" -reqwest = { version = "0.11.1", features = ["stream"] } tokio = { version = "1.4.0", features = ["full"] } tracing-subscriber = "0.2.16" tracing = "0.1.25" @@ -34,6 +33,11 @@ debug_proxy = { path = "crates/debug_proxy" } ptth_relay = { path = "crates/ptth_relay" } ptth_server = { path = "crates/ptth_server" } +[dependencies.reqwest] +version = "0.11.1" +default-features = false +features = ["stream", "rustls-tls", "hyper-rustls"] + [dev-dependencies] base64 = "0.13.0" diff --git a/crates/debug_proxy/Cargo.toml b/crates/debug_proxy/Cargo.toml index f2c0c4b..c9c5468 100644 --- a/crates/debug_proxy/Cargo.toml +++ b/crates/debug_proxy/Cargo.toml @@ -13,9 +13,13 @@ async-trait = "0.1.45" futures-util = "0.3.8" http = "0.2.1" hyper = { version = "0.14.4", features = ["server", "stream"] } -reqwest = "0.11.1" rusty_ulid = "0.10.1" tokio = "1.2.0" tokio-stream = "0.1.3" tracing = "0.1.21" tracing-subscriber = "0.2.15" + +[dependencies.reqwest] +version = "0.11.1" +default-features = false +features = ["stream", "rustls-tls", "hyper-rustls"] diff --git a/crates/ptth_server/Cargo.toml b/crates/ptth_server/Cargo.toml index 4f62c1c..cb13d56 100644 --- a/crates/ptth_server/Cargo.toml +++ b/crates/ptth_server/Cargo.toml @@ -29,7 +29,6 @@ percent-encoding = "2.1.0" pulldown-cmark = { version = "0.8.0", optional = true } rand = "0.8.3" regex = "1.4.1" -reqwest = { version = "0.11.1", features = ["stream"] } rmp-serde = "0.14.4" rusty_ulid = "0.10.1" serde = {version = "1.0.117", features = ["derive"]} @@ -47,6 +46,11 @@ uom = "0.30.0" always_equal = { path = "../always_equal", version = "1.0.0" } ptth_core = { path = "../ptth_core", version = "2.0.0" } +[dependencies.reqwest] +version = "0.11.1" +default-features = false +features = ["stream", "rustls-tls", "hyper-rustls"] + [dev-dependencies] maplit = "1.0.2"