From 8407c5138ade564b1f32455f0296f9ad26ac0a07 Mon Sep 17 00:00:00 2001 From: zonyitoo Date: Tue, 6 May 2025 12:46:29 +0800 Subject: [PATCH] feat: CentOS based image config (#1941) --- Cross-centos.toml | 10 ++++++++++ Cross.toml | 8 -------- README.md | 8 +++++++- 3 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 Cross-centos.toml diff --git a/Cross-centos.toml b/Cross-centos.toml new file mode 100644 index 00000000..b47cb44a --- /dev/null +++ b/Cross-centos.toml @@ -0,0 +1,10 @@ +[build.env] +passthrough = ["RUSTFLAGS"] + +# WARN: GCC 4.8.2 doesn't support +[target.x86_64-unknown-linux-gnu] +image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos" +# GCC 4.8.2 doesn't support ACLE +# https://github.com/briansmith/ring/issues/1728 +# [target.aarch64-unknown-linux-gnu] +# image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main-centos" diff --git a/Cross.toml b/Cross.toml index 690bcab2..54c141f1 100644 --- a/Cross.toml +++ b/Cross.toml @@ -33,11 +33,3 @@ build-std = ["std", "panic_abort", "proc_macro"] build-std = ["std", "panic_abort", "proc_macro"] [target.mipsel-unknown-linux-musl] build-std = ["std", "panic_abort", "proc_macro"] - -# GCC 4.8.2 doesn't support -# [target.x86_64-unknown-linux-gnu] -# image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main-centos" -# GCC 4.8.2 doesn't support ACLE -# https://github.com/briansmith/ring/issues/1728 -# [target.aarch64-unknown-linux-gnu] -# image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main-centos" diff --git a/README.md b/README.md index 1281bf0a..8fab8179 100644 --- a/README.md +++ b/README.md @@ -272,13 +272,19 @@ Requirements: ./build/build-release ``` -Then `sslocal`, `ssserver`, `ssmanager` and `ssurl` will be packaged in +Then `sslocal`, `ssserver`, `ssmanager`, `ssservice` and `ssurl` will be packaged in - `./build/shadowsocks-${VERSION}-stable.x86_64-unknown-linux-musl.tar.xz` - `./build/shadowsocks-${VERSION}-stable.x86_64-pc-windows-gnu.zip` Read `Cargo.toml` for more details. +For Linux with low GLIBC versions, set `CROSS_CONFIG` to CentOS based image: + +```bash +export CROSS_CONFIG=Cross-centos.toml +``` + ## Getting Started Generate a safe and secured password for a specific encryption method (`aes-128-gcm` in the example) with: