From a48f0178be8c07cdac23d6afb34ccec0ea0da897 Mon Sep 17 00:00:00 2001 From: JacobLinCool Date: Fri, 2 Jun 2023 01:30:52 +0800 Subject: [PATCH] feat: replace openssl with rustls --- Cargo.lock | 3 +-- Cargo.toml | 5 ++++- Dockerfile | 4 +--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 760147b..357cf20 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2282,8 +2282,7 @@ dependencies = [ [[package]] name = "reflink" version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc585ec28b565b4c28977ce8363a6636cedc280351ba25a7915f6c9f37f68cbe" +source = "git+https://github.com/JacobLinCool/reflink.git#d7fab35d1834970fadeae8be79d139db25308be2" dependencies = [ "libc", "winapi", diff --git a/Cargo.toml b/Cargo.toml index 5e218fe..160f70a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ base64 = "0.21.0" clap = { version = "4.2.7", features = ["derive", "string"] } http-cache-reqwest = "0.9.0" jsonwebtoken = "8.3.0" -reqwest = "0.11.18" +reqwest = { version = "0.11.18", default-features = false, features = ["rustls", "tokio-rustls"] } reqwest-middleware = "0.2.2" rocket = { version = "0.5.0-rc.3", features = ["json"] } serde = "1.0.163" @@ -40,3 +40,6 @@ wasmer-wasix = "0.4.0" [build-dependencies] vergen = { version = "8.1.3", features = ["build", "cargo", "git", "gitcl", "rustc", "si"] } + +[patch.crates-io] +reflink = { git = "https://github.com/JacobLinCool/reflink.git" } diff --git a/Dockerfile b/Dockerfile index 36b45e6..dda16eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ ENV CARGO_NET_GIT_FETCH_WITH_CLI=true RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories && \ apk update && \ - apk add --no-cache musl-dev git pkgconfig openssl-dev + apk add --no-cache musl-dev git RUN mkdir /tmp/tempproj && \ cd /tmp/tempproj && \ @@ -22,8 +22,6 @@ FROM alpine as runtime WORKDIR /app -RUN apk add --no-cache openssl - COPY --from=builder /app/target/release/wark /app/wark ENTRYPOINT ["/app/wark"]