diff --git a/.github/workflows/daedalus-docker.yml b/.github/workflows/daedalus-docker.yml index ccb387d46..e347a0b33 100644 --- a/.github/workflows/daedalus-docker.yml +++ b/.github/workflows/daedalus-docker.yml @@ -2,7 +2,8 @@ name: daedalus-docker-build on: push: - branches: [ "main" ] + branches: + - '**' paths: - .github/workflows/daedalus-docker.yml - 'apps/daedalus_client/**' diff --git a/.github/workflows/labrinth-docker.yml b/.github/workflows/labrinth-docker.yml index d967b3bab..f0fcd93ec 100644 --- a/.github/workflows/labrinth-docker.yml +++ b/.github/workflows/labrinth-docker.yml @@ -2,7 +2,8 @@ name: docker-build on: push: - branches: [ "main" ] + branches: + - '**' paths: - .github/workflows/labrinth-docker.yml - 'apps/labrinth/**' diff --git a/.idea/daedalus.iml b/.idea/daedalus.iml index 3d715289c..198021c44 100644 --- a/.idea/daedalus.iml +++ b/.idea/daedalus.iml @@ -7,6 +7,11 @@ + + + + + diff --git a/Cargo.lock b/Cargo.lock index a7e14fa43..78e25f3e5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -732,6 +732,7 @@ checksum = "1fcf00bc6d5abb29b5f97e3c61a90b6d3caa12f3faf897d4a3e3607c050a35a7" dependencies = [ "http 0.2.12", "log", + "native-tls", "rustls 0.20.9", "serde", "serde_json", @@ -763,33 +764,6 @@ dependencies = [ "url", ] -[[package]] -name = "aws-lc-rs" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f95446d919226d587817a7d21379e6eb099b97b45110a7f272a444ca5c54070" -dependencies = [ - "aws-lc-sys", - "mirai-annotations", - "paste", - "zeroize", -] - -[[package]] -name = "aws-lc-sys" -version = "0.21.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3ddc4a5b231dd6958b140ff3151b6412b3f4321fab354f399eec8f14b06df62" -dependencies = [ - "bindgen", - "cc", - "cmake", - "dunce", - "fs_extra", - "libc", - "paste", -] - [[package]] name = "aws-region" version = "0.25.5" @@ -859,29 +833,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bindgen" -version = "0.69.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" -dependencies = [ - "bitflags 2.6.0", - "cexpr", - "clang-sys", - "itertools 0.10.5", - "lazy_static", - "lazycell", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash 1.1.0", - "shlex", - "syn 2.0.79", - "which", -] - [[package]] name = "bit-set" version = "0.5.3" @@ -1235,15 +1186,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfb" version = "0.7.3" @@ -1318,42 +1260,20 @@ dependencies = [ "inout", ] -[[package]] -name = "cityhash-rs" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93a719913643003b84bd13022b4b7e703c09342cd03b679c4641c7d2e50dc34d" - -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading 0.8.5", -] - [[package]] name = "clickhouse" -version = "0.13.1" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2135bb9638e8c8c1e3d794f242099e57987059ba52e7e3de597e1d99b2c4a5a3" +checksum = "a0875e527e299fc5f4faba42870bf199a39ab0bb2dbba1b8aef0a2151451130f" dependencies = [ "bstr", "bytes 1.7.2", - "cityhash-rs", "clickhouse-derive", + "clickhouse-rs-cityhash-sys", "futures 0.3.30", - "futures-channel", - "http-body-util", - "hyper 1.4.1", - "hyper-rustls 0.27.3", - "hyper-util", - "lz4_flex", - "replace_with", - "rustls 0.23.13", + "hyper 0.14.31", + "hyper-tls 0.5.0", + "lz4", "sealed", "serde", "static_assertions", @@ -1366,32 +1286,32 @@ dependencies = [ [[package]] name = "clickhouse-derive" -version = "0.2.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d70f3e2893f7d3e017eeacdc9a708fbc29a10488e3ebca21f9df6a5d2b616dbb" +checksum = "18af5425854858c507eec70f7deb4d5d8cec4216fcb086283a78872387281ea5" dependencies = [ "proc-macro2", "quote", - "serde_derive_internals", - "syn 2.0.79", + "serde_derive_internals 0.26.0", + "syn 1.0.109", ] [[package]] -name = "cloudabi" -version = "0.0.3" +name = "clickhouse-rs-cityhash-sys" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +checksum = "4baf9d4700a28d6cb600e17ed6ae2b43298a5245f1f76b4eab63027ebfd592b9" dependencies = [ - "bitflags 1.3.2", + "cc", ] [[package]] -name = "cmake" -version = "0.1.51" +name = "cloudabi" +version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb1e43aa7fd152b1f968787f7dbcdeb306d1867ff373c69955211876c053f91a" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" dependencies = [ - "cc", + "bitflags 1.3.2", ] [[package]] @@ -2760,12 +2680,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs_extra" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" - [[package]] name = "fsevent-sys" version = "4.1.0" @@ -3369,6 +3283,15 @@ dependencies = [ "hashbrown 0.14.5", ] +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "heck" version = "0.4.1" @@ -3632,7 +3555,6 @@ dependencies = [ "http 1.1.0", "hyper 1.4.1", "hyper-util", - "log", "rustls 0.23.13", "rustls-native-certs 0.8.0", "rustls-pki-types", @@ -3642,6 +3564,19 @@ dependencies = [ "webpki-roots 0.26.6", ] +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes 1.7.2", + "hyper 0.14.31", + "native-tls", + "tokio 1.40.0", + "tokio-native-tls", +] + [[package]] name = "hyper-tls" version = "0.6.0" @@ -4348,8 +4283,8 @@ dependencies = [ "governor", "hex", "hmac 0.11.0", - "hyper-rustls 0.27.3", - "hyper-util", + "hyper 0.14.31", + "hyper-tls 0.5.0", "image 0.24.9", "itertools 0.12.1", "jemallocator", @@ -4411,12 +4346,6 @@ dependencies = [ "spin 0.9.8", ] -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - [[package]] name = "lebe" version = "0.5.2" @@ -4429,29 +4358,23 @@ version = "0.11.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0161e452348e399deb685ba05e55ee116cae9410f4f51fe42d597361444521d9" dependencies = [ - "async-trait", "base64 0.22.1", "chumsky", "email-encoding", "email_address", "fastrand 2.1.1", - "futures-io", "futures-util", "hostname", "httpdate", "idna 1.0.2", "mime", + "native-tls", "nom", "percent-encoding", "quoted_printable", - "rustls 0.23.13", - "rustls-pemfile 2.1.3", - "rustls-pki-types", "socket2", "tokio 1.40.0", - "tokio-rustls 0.26.0", "url", - "webpki-roots 0.26.6", ] [[package]] @@ -4474,7 +4397,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf" dependencies = [ "gtk-sys", - "libloading 0.7.4", + "libloading", "once_cell", ] @@ -4504,16 +4427,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "libloading" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" -dependencies = [ - "cfg-if 1.0.0", - "windows-targets 0.48.5", -] - [[package]] name = "libm" version = "0.2.8" @@ -4644,10 +4557,23 @@ dependencies = [ ] [[package]] -name = "lz4_flex" -version = "0.11.3" +name = "lz4" +version = "1.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75761162ae2b0e580d7e7c390558127e5f01b4194debd6221fd8c207fc80e3f5" +checksum = "4d1febb2b4a79ddd1980eede06a8f7902197960aa0383ffcfdd62fe723036725" +dependencies = [ + "lz4-sys", +] + +[[package]] +name = "lz4-sys" +version = "1.11.1+lz4-1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" +dependencies = [ + "cc", + "libc", +] [[package]] name = "lzma-sys" @@ -4935,12 +4861,6 @@ dependencies = [ "ws2_32-sys", ] -[[package]] -name = "mirai-annotations" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1" - [[package]] name = "muda" version = "0.15.1" @@ -6029,16 +5949,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" -[[package]] -name = "prettyplease" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" -dependencies = [ - "proc-macro2", - "syn 2.0.79", -] - [[package]] name = "prettytable-rs" version = "0.10.0" @@ -6265,7 +6175,7 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash 2.0.0", + "rustc-hash", "rustls 0.23.13", "socket2", "thiserror", @@ -6282,7 +6192,7 @@ dependencies = [ "bytes 1.7.2", "rand 0.8.5", "ring 0.17.8", - "rustc-hash 2.0.0", + "rustc-hash", "rustls 0.23.13", "slab", "thiserror", @@ -6579,12 +6489,6 @@ dependencies = [ "bytecheck", ] -[[package]] -name = "replace_with" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a8614ee435691de62bcffcf4a66d91b3594bf1428a5722e79103249a095690" - [[package]] name = "reqwest" version = "0.11.27" @@ -6601,16 +6505,17 @@ dependencies = [ "http-body 0.4.6", "hyper 0.14.31", "hyper-rustls 0.24.2", + "hyper-tls 0.5.0", "ipnet", "js-sys", "log", "mime", "mime_guess", + "native-tls", "once_cell", "percent-encoding", "pin-project-lite", "rustls 0.21.12", - "rustls-native-certs 0.6.3", "rustls-pemfile 1.0.4", "serde", "serde_json", @@ -6618,6 +6523,7 @@ dependencies = [ "sync_wrapper 0.1.2", "system-configuration 0.5.1", "tokio 1.40.0", + "tokio-native-tls", "tokio-rustls 0.24.1", "tokio-util", "tower-service", @@ -6649,7 +6555,7 @@ dependencies = [ "http-body-util", "hyper 1.4.1", "hyper-rustls 0.27.3", - "hyper-tls", + "hyper-tls 0.6.0", "hyper-util", "ipnet", "js-sys", @@ -6909,12 +6815,6 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustc-hash" version = "2.0.0" @@ -6976,13 +6876,26 @@ dependencies = [ "sct", ] +[[package]] +name = "rustls" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" +dependencies = [ + "log", + "ring 0.17.8", + "rustls-pki-types", + "rustls-webpki 0.102.8", + "subtle", + "zeroize", +] + [[package]] name = "rustls" version = "0.23.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2dabaac7466917e566adb06783a81ca48944c6898a1b08b9374106dd671f4c8" dependencies = [ - "aws-lc-rs", "log", "once_cell", "ring 0.17.8", @@ -7071,7 +6984,6 @@ version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ - "aws-lc-rs", "ring 0.17.8", "rustls-pki-types", "untrusted 0.9.0", @@ -7166,7 +7078,7 @@ checksum = "b1eee588578aff73f856ab961cd2f79e36bc45d7ded33a7562adba4667aecc0e" dependencies = [ "proc-macro2", "quote", - "serde_derive_internals", + "serde_derive_internals 0.29.1", "syn 2.0.79", ] @@ -7194,13 +7106,14 @@ checksum = "1c107b6f4780854c8b126e228ea8869f4d7b71260f962fefb57b996b8959ba6b" [[package]] name = "sealed" -version = "0.6.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22f968c5ea23d555e670b449c1c5e7b2fc399fdaec1d304a17cd48e288abc107" +checksum = "6b5e421024b5e5edfbaa8e60ecf90bda9dbffc602dbb230e6028763f85f0c68c" dependencies = [ + "heck 0.3.3", "proc-macro2", "quote", - "syn 2.0.79", + "syn 1.0.109", ] [[package]] @@ -7286,13 +7199,13 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "sentry" -version = "0.32.3" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00421ed8fa0c995f07cde48ba6c89e80f2b312f74ff637326f392fbfd23abe02" +checksum = "5484316556650182f03b43d4c746ce0e3e48074a21e2f51244b648b6542e1066" dependencies = [ "httpdate", "reqwest 0.12.7", - "rustls 0.21.12", + "rustls 0.22.4", "sentry-backtrace", "sentry-contexts", "sentry-core", @@ -7301,14 +7214,14 @@ dependencies = [ "sentry-tracing", "tokio 1.40.0", "ureq", - "webpki-roots 0.25.4", + "webpki-roots 0.26.6", ] [[package]] name = "sentry-actix" -version = "0.32.3" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1986312ea8425a28299262ead2483ca8f0e167994f9239848d5718041abcd49" +checksum = "e461c7d3a46d298b5ffc66127c1f16454dd11d3d89fcfb21023cd499d82b9a78" dependencies = [ "actix-web", "futures-util", @@ -7317,9 +7230,9 @@ dependencies = [ [[package]] name = "sentry-backtrace" -version = "0.32.3" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a79194074f34b0cbe5dd33896e5928bbc6ab63a889bd9df2264af5acb186921e" +checksum = "40aa225bb41e2ec9d7c90886834367f560efc1af028f1c5478a6cce6a59c463a" dependencies = [ "backtrace", "once_cell", @@ -7329,9 +7242,9 @@ dependencies = [ [[package]] name = "sentry-contexts" -version = "0.32.3" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eba8870c5dba2bfd9db25c75574a11429f6b95957b0a78ac02e2970dd7a5249a" +checksum = "1a8dd746da3d16cb8c39751619cefd4fcdbd6df9610f3310fd646b55f6e39910" dependencies = [ "hostname", "libc", @@ -7343,9 +7256,9 @@ dependencies = [ [[package]] name = "sentry-core" -version = "0.32.3" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46a75011ea1c0d5c46e9e57df03ce81f5c7f0a9e199086334a1f9c0a541e0826" +checksum = "161283cfe8e99c8f6f236a402b9ccf726b201f365988b5bb637ebca0abbd4a30" dependencies = [ "once_cell", "rand 0.8.5", @@ -7356,9 +7269,9 @@ dependencies = [ [[package]] name = "sentry-debug-images" -version = "0.32.3" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ec2a486336559414ab66548da610da5e9626863c3c4ffca07d88f7dc71c8de8" +checksum = "8fc6b25e945fcaa5e97c43faee0267eebda9f18d4b09a251775d8fef1086238a" dependencies = [ "findshlibs", "once_cell", @@ -7367,9 +7280,9 @@ dependencies = [ [[package]] name = "sentry-panic" -version = "0.32.3" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eaa3ecfa3c8750c78dcfd4637cfa2598b95b52897ed184b4dc77fcf7d95060d" +checksum = "bc74f229c7186dd971a9491ffcbe7883544aa064d1589bd30b83fb856cd22d63" dependencies = [ "sentry-backtrace", "sentry-core", @@ -7377,9 +7290,9 @@ dependencies = [ [[package]] name = "sentry-tracing" -version = "0.32.3" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f715932bf369a61b7256687c6f0554141b7ce097287e30e3f7ed6e9de82498fe" +checksum = "cd3c5faf2103cd01eeda779ea439b68c4ee15adcdb16600836e97feafab362ec" dependencies = [ "sentry-backtrace", "sentry-core", @@ -7389,9 +7302,9 @@ dependencies = [ [[package]] name = "sentry-types" -version = "0.32.3" +version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4519c900ce734f7a0eb7aba0869dfb225a7af8820634a7dd51449e3b093cfb7c" +checksum = "5d68cdf6bc41b8ff3ae2a9c4671e97426dcdd154cc1d4b6b72813f285d6b163f" dependencies = [ "debugid", "hex", @@ -7447,6 +7360,17 @@ dependencies = [ "syn 2.0.79", ] +[[package]] +name = "serde_derive_internals" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "serde_derive_internals" version = "0.29.1" diff --git a/apps/labrinth/Cargo.toml b/apps/labrinth/Cargo.toml index 2057c1716..739f2c897 100644 --- a/apps/labrinth/Cargo.toml +++ b/apps/labrinth/Cargo.toml @@ -31,19 +31,10 @@ dashmap = "5.4.0" lazy_static = "1.4.0" meilisearch-sdk = "0.24.3" -rust-s3 = { version = "0.33.0", default-features = false, features = [ - "fail-on-err", - "tags", - "tokio-rustls-tls", - "reqwest", -] } -reqwest = { version = "0.11.18", default-features = false, features = [ - "json", - "multipart", - "rustls-tls-native-roots", -] } -hyper-rustls = "0.27.3" -hyper-util = "0.1.9" +rust-s3 = "0.33.0" +reqwest = { version = "0.11.18", features = ["json", "multipart"] } +hyper = { version = "0.14", features = ["full"] } +hyper-tls = "0.5.0" serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } @@ -99,18 +90,14 @@ rust_decimal = { version = "1.33.1", features = [ ] } redis = { version = "0.27.5", features = ["tokio-comp", "ahash", "r2d2"] } deadpool-redis = "0.18.0" -clickhouse = { version = "0.13.1", features = [ - "uuid", - "time", - "rustls-tls-native-roots", -] } +clickhouse = { version = "0.11.2", features = ["uuid", "time"] } uuid = { version = "1.2.2", features = ["v4", "fast-rng", "serde"] } maxminddb = "0.24.0" flate2 = "1.0.25" tar = "0.4.38" -sentry = { version = "0.32.1", default-features = false, features = [ +sentry = { version = "0.34.0", default-features = false, features = [ "backtrace", "contexts", "debug-images", @@ -118,7 +105,7 @@ sentry = { version = "0.32.1", default-features = false, features = [ "rustls", "reqwest", ] } -sentry-actix = "0.32.1" +sentry-actix = "0.34.0" image = "0.24.6" color-thief = "0.2.2" @@ -126,13 +113,7 @@ webp = "0.3.0" woothee = "0.13.0" -lettre = { version = "0.11.10", default-features = false, features = [ - "builder", - "hostname", - "pool", - "smtp-transport", - "tokio1-rustls-tls", -] } +lettre = "0.11.3" derive-new = "0.6.0" rust_iso3166 = "0.1.11" diff --git a/apps/labrinth/Dockerfile b/apps/labrinth/Dockerfile index 0c35ee156..e7126e6dc 100644 --- a/apps/labrinth/Dockerfile +++ b/apps/labrinth/Dockerfile @@ -6,7 +6,7 @@ COPY . . RUN cargo build --release -FROM ubuntu:latest +FROM debian:bookworm-slim LABEL org.opencontainers.image.source=https://github.com/modrinth/code LABEL org.opencontainers.image.description="Modrinth API" diff --git a/apps/labrinth/src/clickhouse/mod.rs b/apps/labrinth/src/clickhouse/mod.rs index eadc2daed..f74daa6a0 100644 --- a/apps/labrinth/src/clickhouse/mod.rs +++ b/apps/labrinth/src/clickhouse/mod.rs @@ -1,3 +1,6 @@ +use hyper::client::HttpConnector; +use hyper_tls::{native_tls, HttpsConnector}; + mod fetch; pub use fetch::*; @@ -11,16 +14,15 @@ pub async fn init_client_with_database( database: &str, ) -> clickhouse::error::Result { let client = { - let tls_connector = hyper_rustls::HttpsConnectorBuilder::new() - .with_native_roots() - .expect("no native root CA certificates found") - .https_only() - .enable_http1() - .build(); - let hyper_client = hyper_util::client::legacy::Client::builder( - hyper_util::rt::TokioExecutor::new(), - ) - .build(tls_connector); + let mut http_connector = HttpConnector::new(); + http_connector.enforce_http(false); // allow https URLs + + let tls_connector = + native_tls::TlsConnector::builder().build().unwrap().into(); + let https_connector = + HttpsConnector::from((http_connector, tls_connector)); + let hyper_client = + hyper::client::Client::builder().build(https_connector); clickhouse::Client::with_http_client(hyper_client) .with_url(dotenvy::var("CLICKHOUSE_URL").unwrap())