Add OpenSSL and support more targets
* Added OpenSSL AEAD support * Added OpenSSL TLS support * Added mips/mipsel support OpenSSL features can be conditinally compiled, targets not supported by ring should use OpenSSL, e.g. mips/mipsel, while other targets should use ring and rustls for crypto and TLS for better performance. Crypto functions from Shadowsocks and VMess are unified in common/crypto.
This commit is contained in:
59
.github/workflows/build.yml
vendored
59
.github/workflows/build.yml
vendored
@@ -4,22 +4,30 @@ on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build-bin-cross:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target:
|
||||
- aarch64-unknown-linux-gnu
|
||||
- aarch64-unknown-linux-musl
|
||||
- arm-unknown-linux-gnueabi
|
||||
- arm-unknown-linux-musleabi
|
||||
- i686-unknown-linux-gnu
|
||||
- i686-unknown-linux-musl
|
||||
# - mips-unknown-linux-gnu
|
||||
- x86_64-pc-windows-gnu
|
||||
- x86_64-unknown-linux-gnu
|
||||
- mips-unknown-linux-musl
|
||||
- mips-unknown-linux-gnu
|
||||
#- mips64-unknown-linux-gnuabi64
|
||||
- mipsel-unknown-linux-musl
|
||||
- mipsel-unknown-linux-gnu
|
||||
#- mipsel64-unknown-linux-gnuabi64
|
||||
- x86_64-unknown-linux-musl
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
- x86_64-unknown-linux-gnu
|
||||
- i686-unknown-linux-musl
|
||||
- i686-unknown-linux-gnu
|
||||
- aarch64-unknown-linux-musl
|
||||
- aarch64-unknown-linux-gnu
|
||||
- arm-unknown-linux-musleabi
|
||||
- arm-unknown-linux-gnueabi
|
||||
- armv7-unknown-linux-musleabihf
|
||||
- armv7-unknown-linux-gnueabihf
|
||||
#- i686-pc-windows-gnu
|
||||
- x86_64-pc-windows-gnu
|
||||
|
||||
steps:
|
||||
- name: checkout
|
||||
@@ -27,10 +35,6 @@ jobs:
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: show last commit
|
||||
run: |
|
||||
git show --summary
|
||||
|
||||
- name: install rust toolchain
|
||||
uses: hecrj/setup-rust-action@v1
|
||||
with:
|
||||
@@ -46,7 +50,7 @@ jobs:
|
||||
|
||||
- name: build
|
||||
run: |
|
||||
cross build --target ${{ matrix.target }} -p leaf-bin --release
|
||||
./misc/build_cross.sh ${{ matrix.target }}
|
||||
|
||||
- name: rename and compress artifacts
|
||||
if: ${{ matrix.target == 'x86_64-pc-windows-gnu' }}
|
||||
@@ -100,7 +104,11 @@ jobs:
|
||||
- name: install llvm
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
run: |
|
||||
brew update && brew install llvm protobuf upx
|
||||
brew uninstall openssl@1.0.2t
|
||||
brew uninstall python@2.7.17
|
||||
brew untap local/openssl
|
||||
brew untap local/python2
|
||||
brew update && brew install llvm protobuf
|
||||
|
||||
- name: build
|
||||
run: |
|
||||
@@ -125,15 +133,6 @@ jobs:
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: show last commit
|
||||
run: |
|
||||
git show --summary
|
||||
|
||||
- name: show xcode
|
||||
run: |
|
||||
xcodebuild -version
|
||||
xcrun --sdk iphoneos --show-sdk-path
|
||||
|
||||
- name: install rust
|
||||
uses: hecrj/setup-rust-action@v1
|
||||
with:
|
||||
@@ -144,6 +143,10 @@ jobs:
|
||||
rustup target add aarch64-apple-ios
|
||||
cargo install cargo-lipo
|
||||
cargo install cbindgen
|
||||
brew uninstall openssl@1.0.2t
|
||||
brew uninstall python@2.7.17
|
||||
brew untap local/openssl
|
||||
brew untap local/python2
|
||||
brew update && brew install llvm unzip protobuf
|
||||
|
||||
- name: build
|
||||
@@ -160,10 +163,6 @@ jobs:
|
||||
mv target/universal/release/libleaf.a .
|
||||
zip libleaf-ios.zip leaf.h libleaf.a
|
||||
|
||||
- name: verify zip artifacts
|
||||
run: |
|
||||
unzip -l libleaf-ios.zip
|
||||
|
||||
- name: upload assets
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
|
||||
97
.github/workflows/release.yml
vendored
97
.github/workflows/release.yml
vendored
@@ -7,21 +7,29 @@ on:
|
||||
|
||||
jobs:
|
||||
build-bin-cross:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
target:
|
||||
- aarch64-unknown-linux-gnu
|
||||
- aarch64-unknown-linux-musl
|
||||
- arm-unknown-linux-gnueabi
|
||||
- arm-unknown-linux-musleabi
|
||||
- i686-unknown-linux-gnu
|
||||
- i686-unknown-linux-musl
|
||||
# - mips-unknown-linux-gnu
|
||||
- x86_64-pc-windows-gnu
|
||||
- x86_64-unknown-linux-gnu
|
||||
- mips-unknown-linux-musl
|
||||
- mips-unknown-linux-gnu
|
||||
#- mips64-unknown-linux-gnuabi64
|
||||
- mipsel-unknown-linux-musl
|
||||
- mipsel-unknown-linux-gnu
|
||||
#- mipsel64-unknown-linux-gnuabi64
|
||||
- x86_64-unknown-linux-musl
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
- x86_64-unknown-linux-gnu
|
||||
- i686-unknown-linux-musl
|
||||
- i686-unknown-linux-gnu
|
||||
- aarch64-unknown-linux-musl
|
||||
- aarch64-unknown-linux-gnu
|
||||
- arm-unknown-linux-musleabi
|
||||
- arm-unknown-linux-gnueabi
|
||||
- armv7-unknown-linux-musleabihf
|
||||
- armv7-unknown-linux-gnueabihf
|
||||
#- i686-pc-windows-gnu
|
||||
- x86_64-pc-windows-gnu
|
||||
|
||||
steps:
|
||||
- name: checkout
|
||||
@@ -29,10 +37,6 @@ jobs:
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: show last commit
|
||||
run: |
|
||||
git show --summary
|
||||
|
||||
- name: install rust toolchain
|
||||
uses: hecrj/setup-rust-action@v1
|
||||
with:
|
||||
@@ -48,7 +52,7 @@ jobs:
|
||||
|
||||
- name: build
|
||||
run: |
|
||||
cross build --target ${{ matrix.target }} -p leaf-bin --release
|
||||
./misc/build_cross.sh ${{ matrix.target }}
|
||||
|
||||
- name: rename and compress artifacts
|
||||
if: ${{ matrix.target == 'x86_64-pc-windows-gnu' }}
|
||||
@@ -90,10 +94,6 @@ jobs:
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: show last commit
|
||||
run: |
|
||||
git show --summary
|
||||
|
||||
- name: install rust toolchain
|
||||
uses: hecrj/setup-rust-action@v1
|
||||
with:
|
||||
@@ -102,7 +102,11 @@ jobs:
|
||||
- name: install llvm
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
run: |
|
||||
brew update && brew install llvm protobuf upx
|
||||
brew uninstall openssl@1.0.2t
|
||||
brew uninstall python@2.7.17
|
||||
brew untap local/openssl
|
||||
brew untap local/python2
|
||||
brew update && brew install llvm protobuf
|
||||
|
||||
- name: build
|
||||
run: |
|
||||
@@ -127,15 +131,6 @@ jobs:
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: show last commit
|
||||
run: |
|
||||
git show --summary
|
||||
|
||||
- name: show xcode
|
||||
run: |
|
||||
xcodebuild -version
|
||||
xcrun --sdk iphoneos --show-sdk-path
|
||||
|
||||
- name: install rust
|
||||
uses: hecrj/setup-rust-action@v1
|
||||
with:
|
||||
@@ -146,6 +141,10 @@ jobs:
|
||||
rustup target add aarch64-apple-ios
|
||||
cargo install cargo-lipo
|
||||
cargo install cbindgen
|
||||
brew uninstall openssl@1.0.2t
|
||||
brew uninstall python@2.7.17
|
||||
brew untap local/openssl
|
||||
brew untap local/python2
|
||||
brew update && brew install llvm unzip protobuf
|
||||
|
||||
- name: build
|
||||
@@ -210,16 +209,24 @@ jobs:
|
||||
matrix:
|
||||
target:
|
||||
- x86_64-apple-darwin
|
||||
- aarch64-unknown-linux-gnu
|
||||
- aarch64-unknown-linux-musl
|
||||
- arm-unknown-linux-gnueabi
|
||||
- arm-unknown-linux-musleabi
|
||||
- i686-unknown-linux-gnu
|
||||
- i686-unknown-linux-musl
|
||||
# - mips-unknown-linux-gnu
|
||||
- x86_64-pc-windows-gnu
|
||||
- x86_64-unknown-linux-gnu
|
||||
- mips-unknown-linux-musl
|
||||
- mips-unknown-linux-gnu
|
||||
#- mips64-unknown-linux-gnuabi64
|
||||
- mipsel-unknown-linux-musl
|
||||
- mipsel-unknown-linux-gnu
|
||||
#- mipsel64-unknown-linux-gnuabi64
|
||||
- x86_64-unknown-linux-musl
|
||||
- x86_64-unknown-linux-gnu
|
||||
- i686-unknown-linux-musl
|
||||
- i686-unknown-linux-gnu
|
||||
- aarch64-unknown-linux-musl
|
||||
- aarch64-unknown-linux-gnu
|
||||
- arm-unknown-linux-musleabi
|
||||
- arm-unknown-linux-gnueabi
|
||||
- armv7-unknown-linux-musleabihf
|
||||
- armv7-unknown-linux-gnueabihf
|
||||
#- i686-pc-windows-gnu
|
||||
- x86_64-pc-windows-gnu
|
||||
|
||||
steps:
|
||||
- name: download upload url
|
||||
@@ -254,10 +261,6 @@ jobs:
|
||||
run: |
|
||||
zip -9 leaf-${{ matrix.target }}.zip leaf-${{ matrix.target }}.exe
|
||||
|
||||
- name: show files
|
||||
run: |
|
||||
ls -R
|
||||
|
||||
- name: upload asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
@@ -286,6 +289,10 @@ jobs:
|
||||
|
||||
- name: install deps
|
||||
run: |
|
||||
brew uninstall openssl@1.0.2t
|
||||
brew uninstall python@2.7.17
|
||||
brew untap local/openssl
|
||||
brew untap local/python2
|
||||
brew update && brew install unzip
|
||||
|
||||
- name: download asset
|
||||
@@ -293,10 +300,6 @@ jobs:
|
||||
with:
|
||||
name: libleaf-ios.zip
|
||||
|
||||
- name: verify zip artifacts
|
||||
run: |
|
||||
unzip -l libleaf-ios.zip
|
||||
|
||||
- name: upload asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
|
||||
Reference in New Issue
Block a user