diff --git a/.circleci/config.yml b/.circleci/config.yml index ba8c8317..32aa8a22 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,7 +25,7 @@ jobs: - restore_cache: key: cargo-cache-{{ arch }}-{{ checksum "rust-version" }}-{{ checksum "Cargo.lock" }} - run: - command: BUILD_EXTRA_FEATURES="openssl-vendored" ./build-host-release + command: BUILD_EXTRA_FEATURES="openssl-vendored local-redir" ./build-host-release no_output_timeout: 1h - save_cache: paths: diff --git a/.travis.yml b/.travis.yml index fdec7467..dac44231 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,6 +57,12 @@ install: script: - cargo test --no-fail-fast - - cargo test --no-fail-fast --features aes-pmac-siv - cargo test --no-fail-fast --no-default-features + - cargo test --no-fail-fast --features aes-pmac-siv - cargo test --no-fail-fast --features single-threaded + - cargo test --no-fail-fast --features openssl-vendored + - cargo test --no-fail-fast --features local-dns-relay + - cargo test --no-fail-fast --no-default-features --features "local-http local-http-rustls" + - if [ "${TRAVIS_OS_NAME}" = "linux" -o "${TRAVIS_OS_NAME}" = "osx" ]; then + cargo test --no-fail-fast --features local-redir + fi diff --git a/Cargo.toml b/Cargo.toml index 1fc124e3..224c2588 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,12 @@ keywords = ["shadowsocks", "proxy", "socks", "socks5", "firewall"] license = "MIT" edition = "2018" +[badges] +appveyor = { repository = "shadowsocks/shadowsocks-rust", branch = "master", service = "github" } +circle-ci = { repository = "shadowsocks/shadowsocks-rust", branch = "master" } +travis-ci = { repository = "shadowsocks/shadowsocks-rust", branch = "master" } +maintenance = { status = "passively-maintained" } + [lib] name = "shadowsocks" diff --git a/build.rs b/build.rs deleted file mode 100644 index fd6c61fd..00000000 --- a/build.rs +++ /dev/null @@ -1,11 +0,0 @@ -fn main() { - // Enable redir (transparent proxy) for these targets - if cfg!(any( - target_os = "linux", - target_os = "macos", - target_os = "freebsd", - target_os = "openbsd" - )) { - println!("cargo:rustc-cfg=feature=\"local-redir\"") - } -} diff --git a/build/build-release b/build/build-release index c603eaf3..3a8a4e79 100755 --- a/build/build-release +++ b/build/build-release @@ -31,8 +31,13 @@ function build() { RELEASE_DIR="target/${TARGET}/release" + EXTRA_FEATURES="" + if [[ "$TARGET" == *"-linux-"* || "$TARGET" == *"-darwin" ]]; then + EXTRA_FEATURES="local-redir" + fi + cross build --target "${TARGET}" \ - --features "aes-pmac-siv openssl-vendored" \ + --features "aes-pmac-siv openssl-vendored ${EXTRA_FEATURES}" \ --release if [[ $? != "0" ]]; then