chore: updated docker according to the change of features

This commit is contained in:
Jun Kurihara 2024-01-14 22:36:32 +09:00
commit 422889cec0
No known key found for this signature in database
GPG key ID: 48ADFD173ED22B03
7 changed files with 67 additions and 67 deletions

View file

@ -44,35 +44,35 @@ jobs:
platform: linux/arm64 platform: linux/arm64
tags-suffix: "-s2n" tags-suffix: "-s2n"
# - target: "gnu" - target: "gnu"
# build-feature: "-native-roots" build-feature: "-webpki-roots"
# platform: linux/amd64 platform: linux/amd64
# tags-suffix: "-native-roots" tags-suffix: "-webpki-roots"
# - target: "gnu" - target: "gnu"
# build-feature: "-native-roots" build-feature: "-webpki-roots"
# platform: linux/arm64 platform: linux/arm64
# tags-suffix: "-native-roots" tags-suffix: "-webpki-roots"
# - target: "musl" - target: "musl"
# build-feature: "-native-roots" build-feature: "-webpki-roots"
# platform: linux/amd64 platform: linux/amd64
# tags-suffix: "-slim-native-roots" tags-suffix: "-slim-webpki-roots"
# - target: "musl" - target: "musl"
# build-feature: "-native-roots" build-feature: "-webpki-roots"
# platform: linux/arm64 platform: linux/arm64
# tags-suffix: "-slim-native-roots" tags-suffix: "-slim-webpki-roots"
# - target: "gnu" - target: "gnu"
# build-feature: "-s2n-native-roots" build-feature: "-s2n-webpki-roots"
# platform: linux/amd64 platform: linux/amd64
# tags-suffix: "-s2n-native-roots" tags-suffix: "-s2n-webpki-roots"
# - target: "gnu" - target: "gnu"
# build-feature: "-s2n-native-roots" build-feature: "-s2n-webpki-roots"
# platform: linux/arm64 platform: linux/arm64
# tags-suffix: "-s2n-native-roots" tags-suffix: "-s2n-webpki-roots"
steps: steps:
- run: "echo 'The relese triggering workflows passed'" - run: "echo 'The relese triggering workflows passed'"
@ -81,10 +81,9 @@ jobs:
id: "set-env" id: "set-env"
run: | run: |
if [ ${{ matrix.platform }} == 'linux/amd64' ]; then PLATFORM_MAP="x86_64"; else PLATFORM_MAP="aarch64"; fi if [ ${{ matrix.platform }} == 'linux/amd64' ]; then PLATFORM_MAP="x86_64"; else PLATFORM_MAP="aarch64"; fi
if [ ${{ github.ref_name == 'develop' && github.event.client_payload.pull_request.head == 'develop' && github.event.client_payload.pull_request.base == 'main' }} || ${{ github.ref_name == 'main' }}]; then BUILD_NAME=""; else BUILD_NAME="-nightly"; fi
if [ ${{ github.ref_name }} == 'main' ]; then BUILD_IMG="latest"; else BUILD_IMG="nightly"; fi if [ ${{ github.ref_name }} == 'main' ]; then BUILD_IMG="latest"; else BUILD_IMG="nightly"; fi
echo "build_img=${BUILD_IMG}" >> $GITHUB_OUTPUT echo "build_img=${BUILD_IMG}" >> $GITHUB_OUTPUT
echo "target_name=rpxy${BUILD_NAME}-${PLATFORM_MAP}-unknown-linux-${{ matrix.target }}${{ matrix.build-feature }}" >> $GITHUB_OUTPUT echo "target_name=rpxy-${PLATFORM_MAP}-unknown-linux-${{ matrix.target }}${{ matrix.build-feature }}" >> $GITHUB_OUTPUT
- name: "docker pull and extract binary from docker image" - name: "docker pull and extract binary from docker image"
id: "extract-binary" id: "extract-binary"

View file

@ -45,7 +45,7 @@ jobs:
- target: "s2n" - target: "s2n"
dockerfile: ./docker/Dockerfile dockerfile: ./docker/Dockerfile
build-args: | build-args: |
"CARGO_FEATURES=--no-default-features --features=http3-s2n,cache,native-tls-backend" "CARGO_FEATURES=--no-default-features --features=http3-s2n,cache,rustls-backend"
"ADDITIONAL_DEPS=pkg-config libssl-dev cmake libclang1 gcc g++" "ADDITIONAL_DEPS=pkg-config libssl-dev cmake libclang1 gcc g++"
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
tags-suffix: "-s2n" tags-suffix: "-s2n"
@ -54,42 +54,42 @@ jobs:
jqtype/rpxy:s2n jqtype/rpxy:s2n
ghcr.io/junkurihara/rust-rpxy:s2n ghcr.io/junkurihara/rust-rpxy:s2n
# - target: "native-roots" - target: "webpki-roots"
# dockerfile: ./docker/Dockerfile dockerfile: ./docker/Dockerfile
# platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
# build-args: | build-args: |
# "CARGO_FEATURES=--no-default-features --features=http3-quinn,cache,native-roots" "CARGO_FEATURES=--no-default-features --features=http3-quinn,cache,webpki-roots"
# tags-suffix: "-native-roots" tags-suffix: "-webpki-roots"
# # Aliases must be used only for release builds # Aliases must be used only for release builds
# aliases: | aliases: |
# jqtype/rpxy:native-roots jqtype/rpxy:webpki-roots
# ghcr.io/junkurihara/rust-rpxy:native-roots ghcr.io/junkurihara/rust-rpxy:webpki-roots
# - target: "slim-native-roots" - target: "slim-webpki-roots"
# dockerfile: ./docker/Dockerfile-slim dockerfile: ./docker/Dockerfile-slim
# build-args: | build-args: |
# "CARGO_FEATURES=--no-default-features --features=http3-quinn,cache,native-roots" "CARGO_FEATURES=--no-default-features --features=http3-quinn,cache,webpki-roots"
# build-contexts: | build-contexts: |
# messense/rust-musl-cross:amd64-musl=docker-image://messense/rust-musl-cross:x86_64-musl messense/rust-musl-cross:amd64-musl=docker-image://messense/rust-musl-cross:x86_64-musl
# messense/rust-musl-cross:arm64-musl=docker-image://messense/rust-musl-cross:aarch64-musl messense/rust-musl-cross:arm64-musl=docker-image://messense/rust-musl-cross:aarch64-musl
# platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
# tags-suffix: "-slim-native-roots" tags-suffix: "-slim-webpki-roots"
# # Aliases must be used only for release builds # Aliases must be used only for release builds
# aliases: | aliases: |
# jqtype/rpxy:slim-native-roots jqtype/rpxy:slim-webpki-roots
# ghcr.io/junkurihara/rust-rpxy:slim-native-roots ghcr.io/junkurihara/rust-rpxy:slim-webpki-roots
# - target: "s2n-native-roots" - target: "s2n-webpki-roots"
# dockerfile: ./docker/Dockerfile dockerfile: ./docker/Dockerfile
# build-args: | build-args: |
# "CARGO_FEATURES=--no-default-features --features=http3-s2n,cache,native-roots" "CARGO_FEATURES=--no-default-features --features=http3-s2n,cache,webpki-roots"
# "ADDITIONAL_DEPS=pkg-config libssl-dev cmake libclang1 gcc g++" "ADDITIONAL_DEPS=pkg-config libssl-dev cmake libclang1 gcc g++"
# platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
# tags-suffix: "-s2n-native-roots" tags-suffix: "-s2n-webpki-roots"
# # Aliases must be used only for release builds # Aliases must be used only for release builds
# aliases: | aliases: |
# jqtype/rpxy:s2n-native-roots jqtype/rpxy:s2n-webpki-roots
# ghcr.io/junkurihara/rust-rpxy:s2n-native-roots ghcr.io/junkurihara/rust-rpxy:s2n-webpki-roots
steps: steps:
- name: Checkout - name: Checkout

View file

@ -5,6 +5,7 @@
- Breaking: `hyper`-1.0 for both server and client modules. - Breaking: `hyper`-1.0 for both server and client modules.
- Breaking: Remove `override_host` option in upstream options. Add a reverse option, i.e., `keep_original_host`, and the similar option `set_upstream_host`. While `keep_original_host` can be explicitly specified, `rpxy` keeps the original `host` given by the incoming request by default. Then, the original `host` header is maintained or added from the value of url request line. If `host` header needs to be overridden with the upstream host name (backend uri's host name), `set_upstream_host` has to be set. If both of `set_upstream_host` and `keep_original_host` are set, `keep_original_host` is prioritized since it is explicitly specified. - Breaking: Remove `override_host` option in upstream options. Add a reverse option, i.e., `keep_original_host`, and the similar option `set_upstream_host`. While `keep_original_host` can be explicitly specified, `rpxy` keeps the original `host` given by the incoming request by default. Then, the original `host` header is maintained or added from the value of url request line. If `host` header needs to be overridden with the upstream host name (backend uri's host name), `set_upstream_host` has to be set. If both of `set_upstream_host` and `keep_original_host` are set, `keep_original_host` is prioritized since it is explicitly specified.
- Breaking: Introduced `native-tls-backend` feature to use the native TLS engine to access backend applications. - Breaking: Introduced `native-tls-backend` feature to use the native TLS engine to access backend applications.
- Breaking: Changed the policy of the default cert store from `webpki` to the system-native store. Thus we terminated the feature `native-roots` and introduced `webpki-roots` feature to use `webpki` root cert store.
- Redesigned: Cache structure is totally redesigned with more memory-efficient way to read from cache file, and more secure way to strongly bind memory-objects with files with hash values. - Redesigned: Cache structure is totally redesigned with more memory-efficient way to read from cache file, and more secure way to strongly bind memory-objects with files with hash values.
- Redesigned: HTTP body handling flow is also redesigned with more memory-and-time efficient techniques without putting the whole objects on memory by using `futures::stream::Stream` and `futures::channel::mpsc` - Redesigned: HTTP body handling flow is also redesigned with more memory-and-time efficient techniques without putting the whole objects on memory by using `futures::stream::Stream` and `futures::channel::mpsc`
- Refactor: lots of minor improvements - Refactor: lots of minor improvements

View file

@ -14,8 +14,8 @@ services:
additional_contexts: additional_contexts:
- messense/rust-musl-cross:amd64-musl=docker-image://messense/rust-musl-cross:x86_64-musl - messense/rust-musl-cross:amd64-musl=docker-image://messense/rust-musl-cross:x86_64-musl
- messense/rust-musl-cross:arm64-musl=docker-image://messense/rust-musl-cross:aarch64-musl - messense/rust-musl-cross:arm64-musl=docker-image://messense/rust-musl-cross:aarch64-musl
# args: # Uncomment when build with native cert store # args: # Uncomment when build with webpki cert store
# - "CARGO_FEATURES=--no-default-features --features=http3-quinn,native-roots" # - "CARGO_FEATURES=--no-default-features --features=http3-quinn,webpki-roots"
dockerfile: ./docker/Dockerfile-slim # based on alpine and build x86_64-unknown-linux-musl dockerfile: ./docker/Dockerfile-slim # based on alpine and build x86_64-unknown-linux-musl
platforms: # Choose your platforms platforms: # Choose your platforms
# - "linux/amd64" # - "linux/amd64"

View file

@ -14,8 +14,8 @@ services:
# args: # Uncomment when build quic-s2n version # args: # Uncomment when build quic-s2n version
# - "CARGO_FEATURES=--no-default-features --features=http3-s2n" # - "CARGO_FEATURES=--no-default-features --features=http3-s2n"
# - "ADDITIONAL_DEPS=pkg-config libssl-dev cmake libclang1 gcc g++" # - "ADDITIONAL_DEPS=pkg-config libssl-dev cmake libclang1 gcc g++"
# args: # Uncomment when build with native cert store # args: # Uncomment when build with webpki root store
# - "CARGO_FEATURES=--no-default-features --features=http3-quinn,native-roots" # - "CARGO_FEATURES=--no-default-features --features=http3-quinn,webpki-roots"
dockerfile: ./docker/Dockerfile # based on ubuntu 22.04 and build x86_64-unknown-linux-gnu dockerfile: ./docker/Dockerfile # based on ubuntu 22.04 and build x86_64-unknown-linux-gnu
platforms: # Choose your platforms platforms: # Choose your platforms
# - "linux/amd64" # - "linux/amd64"

View file

@ -17,7 +17,7 @@ http3-quinn = ["rpxy-lib/http3-quinn"]
http3-s2n = ["rpxy-lib/http3-s2n"] http3-s2n = ["rpxy-lib/http3-s2n"]
native-tls-backend = ["rpxy-lib/native-tls-backend"] native-tls-backend = ["rpxy-lib/native-tls-backend"]
rustls-backend = ["rpxy-lib/rustls-backend"] rustls-backend = ["rpxy-lib/rustls-backend"]
rustls-backend-webpki = ["rpxy-lib/rustls-backend-webpki"] webpki-roots = ["rpxy-lib/webpki-roots"]
cache = ["rpxy-lib/cache"] cache = ["rpxy-lib/cache"]
[dependencies] [dependencies]

View file

@ -25,7 +25,7 @@ cache = ["http-cache-semantics", "lru", "sha2", "base64"]
sticky-cookie = ["base64", "sha2", "chrono"] sticky-cookie = ["base64", "sha2", "chrono"]
native-tls-backend = ["hyper-tls"] native-tls-backend = ["hyper-tls"]
rustls-backend = ["hyper-rustls"] rustls-backend = ["hyper-rustls"]
rustls-backend-webpki = ["rustls-backend", "hyper-rustls/webpki-tokio"] webpki-roots = ["rustls-backend", "hyper-rustls/webpki-tokio"]
[dependencies] [dependencies]
rand = "0.8.5" rand = "0.8.5"