From badc071075ffdc050d9e11dea129ef7dd8e4a832 Mon Sep 17 00:00:00 2001 From: Macbook Date: Mon, 4 Nov 2024 21:08:22 +0700 Subject: [PATCH 01/43] build cloak, macos, awg for macos x86_64, arm64 --- .github/workflows/build_awg_macosne.yml | 45 ++++++++++++++++++++++++ .github/workflows/build_cloak.yml | 17 ++++----- .github/workflows/build_libssh_macos.yml | 22 ++++++++---- 3 files changed, 70 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/build_awg_macosne.yml diff --git a/.github/workflows/build_awg_macosne.yml b/.github/workflows/build_awg_macosne.yml new file mode 100644 index 0000000..e9a30da --- /dev/null +++ b/.github/workflows/build_awg_macosne.yml @@ -0,0 +1,45 @@ +name: awg-macos-network-extension + +on: [push] + +jobs: + Build-WG-macOS-NE: + name: 'AmneziaWG for macOS NE' + runs-on: macos-13 + if: | + contains(github.event.head_commit.message, '[all]') || + contains(github.event.head_commit.message, '[macos]') || + contains(github.event.head_commit.message, '[awg]') || + contains(github.event.head_commit.message, '[macos-ne-awg]') + + steps: + - name: 'Install dependencies' + run: brew install swiftlint + + - name: 'Setup/Update Go' + uses: actions/setup-go@v5 + with: + go-version: '>=1.22.1' + + - name: 'Get AmneziaWG' + uses: actions/checkout@v4 + with: + repository: amnezia-vpn/amneziawg-apple + ref: feature/xray-merge + path: awg-apple + + - name: 'Build WG x86_64 for macOS' + working-directory: awg-apple/Sources/WireGuardKitGo + run: | + ARCHS=x86_64 + PLATFORM_NAME=macosx + OUTPUT_DIR="${{ github.workspace }}/awg-apple/Sources/WireGuardKitGo/out" + TMP_DIR="${{ github.workspace }}/awg-apple/Sources/WireGuardKitGo/.tmp/wireguard-go-bridge" + make + - name: 'Archive artifacts' + uses: actions/upload-artifact@v4 + with: + name: awg-macos + path: ${{ github.workspace }}/awg-apple/Sources/WireGuardKitGo/out + if-no-files-found: error + retention-days: 7 \ No newline at end of file diff --git a/.github/workflows/build_cloak.yml b/.github/workflows/build_cloak.yml index 118231f..cacd304 100644 --- a/.github/workflows/build_cloak.yml +++ b/.github/workflows/build_cloak.yml @@ -94,10 +94,15 @@ jobs: if: | contains(github.event.head_commit.message, '[all]') || contains(github.event.head_commit.message, '[macos]') || - contains(github.event.head_commit.message, '[cloak]') + contains(github.event.head_commit.message, '[cloak]') || + contains(github.event.head_commit.message, '[cloak-macos]') - name: "Build Cloak Desktop plugin" + name: "Build Cloak MacOS plugin" steps: + - name: 'Install GO' + uses: actions/setup-go@v2 + with: + go-version: '^1.22' - name: Get Cloak uses: actions/checkout@v3 @@ -106,16 +111,12 @@ jobs: ref: master-amnezia path: Cloak - # - name: 'Run build script' - # working-directory: Cloak - # run: | - # CGO_ENABLED=1 GOOS="darwin" GOARCH="amd64" go build -v -o ./release/plugin/darwin/ck-ovpn-plugin.a -buildmode=c-archive ./cmd/ck-ovpn-plugin/ - - name: Build for x86_64 + - name: Build for x86_64 MacOS working-directory: Cloak run: | CGO_ENABLED=1 GOOS="darwin" GOARCH="amd64" go build -v -o ./release/plugin/darwin/ck-ovpn-plugin-x86_64.a -buildmode=c-archive ./cmd/ck-ovpn-plugin/ - - name: Build for arm64 + - name: Build for arm64 MacOS working-directory: Cloak run: | CGO_ENABLED=1 GOOS="darwin" GOARCH="arm64" go build -v -o ./release/plugin/darwin/ck-ovpn-plugin-arm64.a -buildmode=c-archive ./cmd/ck-ovpn-plugin/ diff --git a/.github/workflows/build_libssh_macos.yml b/.github/workflows/build_libssh_macos.yml index 1c01e15..6767c79 100644 --- a/.github/workflows/build_libssh_macos.yml +++ b/.github/workflows/build_libssh_macos.yml @@ -21,7 +21,7 @@ jobs: contains(github.event.head_commit.message, '[libssh]') strategy: matrix: - arch: [x86_64] + arch: [arm64] # no-crypto=yes: builds version with all crypto disabled # no-crypto=no: builds version with all crypto enabled (where required dependencies are available) no_crypto: @@ -48,24 +48,34 @@ jobs: - name: Build zlib run: | cd zlib-${{env.ZLIB_VERSION}} - cmake . + cmake . -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} make zlibstatic cp ./libz.a ${{github.workspace}}/libssh-${{env.LIBSSH_VERSION}}/build/libz.a - name: Build openssl run: | cd openssl-${{env.OPENSSL_VERSION}} - ./Configure no-asm no-shared darwin64-x86_64-cc + ./Configure no-asm no-shared darwin64-${{ matrix.arch }}-cc make - name: Build libssh run: | cd libssh-${{env.LIBSSH_VERSION}}/build - cmake .. -DCMAKE_BUILD_TYPE=Release -DOPENSSL_USE_STATIC_LIBS=TRUE -DWITH_GSSAPI=OFF -DBUILD_SHARED_LIBS=OFF -DOPENSSL_ROOT_DIR=${{github.workspace}}/openssl-${{env.OPENSSL_VERSION}} -DZLIB_ROOT_DIR=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}} -DZLIB_LIBRARY=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}}/libz.a -DZLIB_INCLUDE=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}} + cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} -DOPENSSL_USE_STATIC_LIBS=TRUE -DWITH_GSSAPI=OFF -DBUILD_SHARED_LIBS=OFF -DOPENSSL_ROOT_DIR=${{github.workspace}}/openssl-${{env.OPENSSL_VERSION}} -DZLIB_ROOT_DIR=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}} -DZLIB_LIBRARY=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}}/libz.a -DZLIB_INCLUDE=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}} make ssh + make install + - name: Copy libssh.a to build directory + run: | + mkdir -p libssh-${{env.LIBSSH_VERSION}}/build/${{ matrix.arch }} + cp /usr/local/lib/libssh.a libssh-${{env.LIBSSH_VERSION}}/build/${{ matrix.arch }}/libssh.a + cp ${{ github.workspace }}/zlib-${{ env.ZLIB_VERSION }}/libz.a libssh-${{env.LIBSSH_VERSION}}/build/${{ matrix.arch }}/libz.a + + - name: List files in build directory + run: ls -la libssh-${{env.LIBSSH_VERSION}}/build/${{ matrix.arch }} + - name: Upload Artifact - uses: actions/upload-artifact@v2.2.4 + uses: actions/upload-artifact@v3 with: name: libssh-macos-${{ matrix.arch }} path: ${{ github.workspace }}/libssh-${{env.LIBSSH_VERSION}}/build @@ -80,7 +90,7 @@ jobs: steps: - name: Setup | Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup | Artifacts uses: actions/download-artifact@v2 From 3742af2dd89d594b1f80067e530558256d5a3f51 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 20 Dec 2024 21:38:51 +0700 Subject: [PATCH 02/43] [openvpnadapter] --- .github/workflows/build_openvpn_ios.yml | 67 +++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/build_openvpn_ios.yml diff --git a/.github/workflows/build_openvpn_ios.yml b/.github/workflows/build_openvpn_ios.yml new file mode 100644 index 0000000..da8f4ed --- /dev/null +++ b/.github/workflows/build_openvpn_ios.yml @@ -0,0 +1,67 @@ +name: Build OpenVPNAdapter for ios + +on: [push] + +jobs: + build-macos: + name: 'AmneziaWG for macOS NE' + runs-on: macos-latest + if: | + contains(github.event.head_commit.message, '[all]') || + contains(github.event.head_commit.message, '[macos]') || + contains(github.event.head_commit.message, '[openvpnadapter]') + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: 'Get OpenVPNAdapter' + uses: actions/checkout@v3 + with: + repository: amnezia-vpn/OpenVPNAdapter + ref: feature/macox-network-extension + path: OpenVPNAdapter + + - name: Set up Xcode environment + run: | + echo "Setting up Xcode environment" + export XCODEBUILD="/usr/bin/xcodebuild" + export WORKINGDIR=`pwd` + export PATCH="/usr/bin/patch" + + - name: Configure amnezia.xcconfig + run: | + echo "Configuring amnezia.xcconfig..." + cat $WORKINGDIR/3rd/OpenVPNAdapter/Configuration/Project-MacNE.xcconfig > $WORKINGDIR/3rd/OpenVPNAdapter/Configuration/amnezia.xcconfig + cat << EOF >> $WORKINGDIR/3rd/OpenVPNAdapter/Configuration/amnezia.xcconfig + PROJECT_TEMP_DIR = $WORKINGDIR/3rd/OpenVPNAdapter/build/OpenVPNAdapter.build + CONFIGURATION_BUILD_DIR = $WORKINGDIR/3rd/OpenVPNAdapter/build/Release-macos + BUILT_PRODUCTS_DIR = $WORKINGDIR/3rd/OpenVPNAdapter/build/Release-macos + EOF + + - name: Get macOS SDK version + id: sdk_version + run: | + MACOSX_SDK=$(xcrun --sdk macosx --show-sdk-path | sed -E 's/.*MacOSX([0-9]+\.[0-9]+)\.sdk/\1/') + echo "Using macOS SDK version: $MACOSX_SDK" + echo "::set-output name=sdk::$MACOSX_SDK" + + - name: Build OpenVPNAdapter + run: | + cd 3rd/OpenVPNAdapter + $XCODEBUILD -scheme OpenVPNAdapter \ + -configuration Release \ + -xcconfig Configuration/amnezia.xcconfig \ + -sdk macosx${{ steps.sdk_version.outputs.sdk }} \ + -destination 'generic/platform=macOS' \ + -project OpenVPNAdapter.xcodeproj + + - name: Remove CodeSignature + run: | + echo "Removing CodeSignature if exists..." + rm -rf ./build/Release-macos/OpenVPNAdapter.framework/Versions/A/_CodeSignature + + - name: Archive Build + uses: actions/upload-artifact@v3 + with: + name: OpenVPNAdapter-macos + path: 3rd/OpenVPNAdapter/build/Release-macos From 8d64f37e8a1eec8971e3cded7a0d21fcd735c9da Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 20 Dec 2024 21:42:33 +0700 Subject: [PATCH 03/43] [openvpnadapter] test --- .github/workflows/build_openvpn_ios.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_openvpn_ios.yml b/.github/workflows/build_openvpn_ios.yml index da8f4ed..d87fddf 100644 --- a/.github/workflows/build_openvpn_ios.yml +++ b/.github/workflows/build_openvpn_ios.yml @@ -38,7 +38,7 @@ jobs: BUILT_PRODUCTS_DIR = $WORKINGDIR/3rd/OpenVPNAdapter/build/Release-macos EOF - - name: Get macOS SDK version + - name: Get macOS SDK id: sdk_version run: | MACOSX_SDK=$(xcrun --sdk macosx --show-sdk-path | sed -E 's/.*MacOSX([0-9]+\.[0-9]+)\.sdk/\1/') From 03c0621be459a104ed25ed72886d32806b3e8237 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 20 Dec 2024 21:44:06 +0700 Subject: [PATCH 04/43] [openvpnadapter] test --- .github/workflows/build_openvpn_ios.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_openvpn_ios.yml b/.github/workflows/build_openvpn_ios.yml index d87fddf..23a94b0 100644 --- a/.github/workflows/build_openvpn_ios.yml +++ b/.github/workflows/build_openvpn_ios.yml @@ -31,11 +31,11 @@ jobs: - name: Configure amnezia.xcconfig run: | echo "Configuring amnezia.xcconfig..." - cat $WORKINGDIR/3rd/OpenVPNAdapter/Configuration/Project-MacNE.xcconfig > $WORKINGDIR/3rd/OpenVPNAdapter/Configuration/amnezia.xcconfig - cat << EOF >> $WORKINGDIR/3rd/OpenVPNAdapter/Configuration/amnezia.xcconfig - PROJECT_TEMP_DIR = $WORKINGDIR/3rd/OpenVPNAdapter/build/OpenVPNAdapter.build - CONFIGURATION_BUILD_DIR = $WORKINGDIR/3rd/OpenVPNAdapter/build/Release-macos - BUILT_PRODUCTS_DIR = $WORKINGDIR/3rd/OpenVPNAdapter/build/Release-macos + cat $WORKINGDIR/OpenVPNAdapter/Configuration/Project-MacNE.xcconfig > $WORKINGDIR/OpenVPNAdapter/Configuration/amnezia.xcconfig + cat << EOF >> $WORKINGDIR/OpenVPNAdapter/Configuration/amnezia.xcconfig + PROJECT_TEMP_DIR = $WORKINGDIR/OpenVPNAdapter/build/OpenVPNAdapter.build + CONFIGURATION_BUILD_DIR = $WORKINGDIR/OpenVPNAdapter/build/Release-macos + BUILT_PRODUCTS_DIR = $WORKINGDIR/OpenVPNAdapter/build/Release-macos EOF - name: Get macOS SDK @@ -47,7 +47,7 @@ jobs: - name: Build OpenVPNAdapter run: | - cd 3rd/OpenVPNAdapter + cd OpenVPNAdapter $XCODEBUILD -scheme OpenVPNAdapter \ -configuration Release \ -xcconfig Configuration/amnezia.xcconfig \ @@ -64,4 +64,4 @@ jobs: uses: actions/upload-artifact@v3 with: name: OpenVPNAdapter-macos - path: 3rd/OpenVPNAdapter/build/Release-macos + path: OpenVPNAdapter/build/Release-macos From 5b572907c8f6e1bf710762e7da29f276b783b585 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 20 Dec 2024 21:48:56 +0700 Subject: [PATCH 05/43] [openvpnadapter] test --- .github/workflows/build_openvpn_ios.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_openvpn_ios.yml b/.github/workflows/build_openvpn_ios.yml index 23a94b0..238194a 100644 --- a/.github/workflows/build_openvpn_ios.yml +++ b/.github/workflows/build_openvpn_ios.yml @@ -27,6 +27,7 @@ jobs: export XCODEBUILD="/usr/bin/xcodebuild" export WORKINGDIR=`pwd` export PATCH="/usr/bin/patch" + echo "Working directory: $WORKINGDIR" - name: Configure amnezia.xcconfig run: | From e1c58cb8eeb55fe44dfa020a511dc4732e107f3c Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 20 Dec 2024 21:50:29 +0700 Subject: [PATCH 06/43] [openvpnadapter] test --- .github/workflows/build_openvpn_ios.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_openvpn_ios.yml b/.github/workflows/build_openvpn_ios.yml index 238194a..5dd80a2 100644 --- a/.github/workflows/build_openvpn_ios.yml +++ b/.github/workflows/build_openvpn_ios.yml @@ -27,10 +27,10 @@ jobs: export XCODEBUILD="/usr/bin/xcodebuild" export WORKINGDIR=`pwd` export PATCH="/usr/bin/patch" - echo "Working directory: $WORKINGDIR" - + - name: Configure amnezia.xcconfig run: | + echo "Working directory: $WORKINGDIR" echo "Configuring amnezia.xcconfig..." cat $WORKINGDIR/OpenVPNAdapter/Configuration/Project-MacNE.xcconfig > $WORKINGDIR/OpenVPNAdapter/Configuration/amnezia.xcconfig cat << EOF >> $WORKINGDIR/OpenVPNAdapter/Configuration/amnezia.xcconfig From c0aacec2d1722379a89356a49744dbe4f5d53f09 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 20 Dec 2024 21:52:17 +0700 Subject: [PATCH 07/43] [openvpnadapter] test --- .github/workflows/build_openvpn_ios.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_openvpn_ios.yml b/.github/workflows/build_openvpn_ios.yml index 5dd80a2..3371740 100644 --- a/.github/workflows/build_openvpn_ios.yml +++ b/.github/workflows/build_openvpn_ios.yml @@ -30,6 +30,7 @@ jobs: - name: Configure amnezia.xcconfig run: | + export WORKINGDIR=`pwd` echo "Working directory: $WORKINGDIR" echo "Configuring amnezia.xcconfig..." cat $WORKINGDIR/OpenVPNAdapter/Configuration/Project-MacNE.xcconfig > $WORKINGDIR/OpenVPNAdapter/Configuration/amnezia.xcconfig From 7652b630e05b3aad555cdd66b0a2b87c2a4c2ef0 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 20 Dec 2024 21:53:33 +0700 Subject: [PATCH 08/43] [openvpnadapter] test --- .github/workflows/build_openvpn_ios.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/build_openvpn_ios.yml b/.github/workflows/build_openvpn_ios.yml index 3371740..eefe175 100644 --- a/.github/workflows/build_openvpn_ios.yml +++ b/.github/workflows/build_openvpn_ios.yml @@ -20,13 +20,6 @@ jobs: repository: amnezia-vpn/OpenVPNAdapter ref: feature/macox-network-extension path: OpenVPNAdapter - - - name: Set up Xcode environment - run: | - echo "Setting up Xcode environment" - export XCODEBUILD="/usr/bin/xcodebuild" - export WORKINGDIR=`pwd` - export PATCH="/usr/bin/patch" - name: Configure amnezia.xcconfig run: | @@ -50,6 +43,7 @@ jobs: - name: Build OpenVPNAdapter run: | cd OpenVPNAdapter + export XCODEBUILD="/usr/bin/xcodebuild" $XCODEBUILD -scheme OpenVPNAdapter \ -configuration Release \ -xcconfig Configuration/amnezia.xcconfig \ From 5c2c4206a81f2bbefbe040a677194bd3df5f62b6 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 20 Dec 2024 21:59:01 +0700 Subject: [PATCH 09/43] [openvpnadapter] build for macos ne --- .../{build_openvpn_ios.yml => build_openvpn_macosne.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{build_openvpn_ios.yml => build_openvpn_macosne.yml} (98%) diff --git a/.github/workflows/build_openvpn_ios.yml b/.github/workflows/build_openvpn_macosne.yml similarity index 98% rename from .github/workflows/build_openvpn_ios.yml rename to .github/workflows/build_openvpn_macosne.yml index eefe175..54b6434 100644 --- a/.github/workflows/build_openvpn_ios.yml +++ b/.github/workflows/build_openvpn_macosne.yml @@ -1,4 +1,4 @@ -name: Build OpenVPNAdapter for ios +name: Build OpenVPNAdapter for macos ne on: [push] From 6ef2a2c9c04f33dba179d1a156e3d72614ed2256 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 20 Dec 2024 22:06:21 +0700 Subject: [PATCH 10/43] [openvpnadapter] build for ios --- ...pn_macosne.yml => build_openvpn_apple.yml} | 51 ++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) rename .github/workflows/{build_openvpn_macosne.yml => build_openvpn_apple.yml} (55%) diff --git a/.github/workflows/build_openvpn_macosne.yml b/.github/workflows/build_openvpn_apple.yml similarity index 55% rename from .github/workflows/build_openvpn_macosne.yml rename to .github/workflows/build_openvpn_apple.yml index 54b6434..9874eb9 100644 --- a/.github/workflows/build_openvpn_macosne.yml +++ b/.github/workflows/build_openvpn_apple.yml @@ -1,4 +1,4 @@ -name: Build OpenVPNAdapter for macos ne +name: Build OpenVPNAdapter for Apple on: [push] @@ -61,3 +61,52 @@ jobs: with: name: OpenVPNAdapter-macos path: OpenVPNAdapter/build/Release-macos + build-ios: + name: 'Build OpenVPNAdapter for iOS' + runs-on: macos-latest + if: | + contains(github.event.head_commit.message, '[all]') || + contains(github.event.head_commit.message, '[ios]') || + contains(github.event.head_commit.message, '[openvpnadapter]') + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: 'Get OpenVPNAdapter' + uses: actions/checkout@v3 + with: + repository: amnezia-vpn/OpenVPNAdapter + ref: master + path: OpenVPNAdapter + + - name: Configure amnezia.xcconfig + run: | + export WORKINGDIR=`pwd` + echo "Configuring amnezia.xcconfig..." + cat $WORKINGDIR/OpenVPNAdapter/Configuration/Project.xcconfig > $WORKINGDIR/OpenVPNAdapter/Configuration/amnezia.xcconfig + cat << EOF >> $WORKINGDIR/OpenVPNAdapter/Configuration/amnezia.xcconfig + PROJECT_TEMP_DIR = $WORKINGDIR/OpenVPNAdapter/build/OpenVPNAdapter.build + CONFIGURATION_BUILD_DIR = $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos + BUILT_PRODUCTS_DIR = $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos + EOF + + - name: Build OpenVPNAdapter for iOS + run: | + export SDK_PATH=`xcrun --sdk iphoneos --show-sdk-path` + export CLANG=`xcrun --sdk iphoneos --find clang` + export XCODEBUILD="/usr/bin/xcodebuild" + + cd OpenVPNAdapter + $XCODEBUILD -scheme OpenVPNAdapter \ + -configuration Release \ + -xcconfig Configuration/amnezia.xcconfig \ + -sdk iphoneos \ + -destination 'generic/platform=iOS' \ + -project OpenVPNAdapter.xcodeproj + + - name: Archive Build + uses: actions/upload-artifact@v3 + with: + name: OpenVPNAdapter-ios + path: OpenVPNAdapter/build/Release-iphoneos From 439ffdbfc58c985625da8b2a7a4c24f8ef94d61f Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 20 Dec 2024 22:10:23 +0700 Subject: [PATCH 11/43] [openvpnadapter] build for apple --- .github/workflows/build_openvpn_apple.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_openvpn_apple.yml b/.github/workflows/build_openvpn_apple.yml index 9874eb9..b9c1b09 100644 --- a/.github/workflows/build_openvpn_apple.yml +++ b/.github/workflows/build_openvpn_apple.yml @@ -4,7 +4,7 @@ on: [push] jobs: build-macos: - name: 'AmneziaWG for macOS NE' + name: 'OpenVPNAdapter for macOS NE' runs-on: macos-latest if: | contains(github.event.head_commit.message, '[all]') || @@ -62,7 +62,7 @@ jobs: name: OpenVPNAdapter-macos path: OpenVPNAdapter/build/Release-macos build-ios: - name: 'Build OpenVPNAdapter for iOS' + name: 'OpenVPNAdapter for iOS' runs-on: macos-latest if: | contains(github.event.head_commit.message, '[all]') || From 6238fc260734930204bcc4f1a461c498a4fd3276 Mon Sep 17 00:00:00 2001 From: Macbook Date: Sat, 21 Dec 2024 16:08:41 +0700 Subject: [PATCH 12/43] [openvpnadapter] remove code sign --- .../{build_openvpn_apple.yml => build_openvpnadapter_apple.yml} | 1 + 1 file changed, 1 insertion(+) rename .github/workflows/{build_openvpn_apple.yml => build_openvpnadapter_apple.yml} (97%) diff --git a/.github/workflows/build_openvpn_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml similarity index 97% rename from .github/workflows/build_openvpn_apple.yml rename to .github/workflows/build_openvpnadapter_apple.yml index b9c1b09..d635b3f 100644 --- a/.github/workflows/build_openvpn_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -55,6 +55,7 @@ jobs: run: | echo "Removing CodeSignature if exists..." rm -rf ./build/Release-macos/OpenVPNAdapter.framework/Versions/A/_CodeSignature + rm -rf ./build/Release-macos/OpenVPNAdapter.framework/Versions/Current/_CodeSignature - name: Archive Build uses: actions/upload-artifact@v3 From 959a3492a6ddb669a91398d6123a1a2eb7566220 Mon Sep 17 00:00:00 2001 From: Macbook Date: Sat, 21 Dec 2024 16:12:54 +0700 Subject: [PATCH 13/43] [openvpnadapter] build for arm64vs x86_64 --- .../workflows/build_openvpnadapter_apple.yml | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index d635b3f..aae90f1 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -40,7 +40,7 @@ jobs: echo "Using macOS SDK version: $MACOSX_SDK" echo "::set-output name=sdk::$MACOSX_SDK" - - name: Build OpenVPNAdapter + - name: Build OpenVPNAdapter for x86_64 run: | cd OpenVPNAdapter export XCODEBUILD="/usr/bin/xcodebuild" @@ -49,8 +49,28 @@ jobs: -xcconfig Configuration/amnezia.xcconfig \ -sdk macosx${{ steps.sdk_version.outputs.sdk }} \ -destination 'generic/platform=macOS' \ + -arch x86_64 \ -project OpenVPNAdapter.xcodeproj + - name: Build OpenVPNAdapter for arm64 + run: | + cd OpenVPNAdapter + export XCODEBUILD="/usr/bin/xcodebuild" + $XCODEBUILD -scheme OpenVPNAdapter \ + -configuration Release \ + -xcconfig Configuration/amnezia.xcconfig \ + -sdk macosx${{ steps.sdk_version.outputs.sdk }} \ + -destination 'generic/platform=macOS' \ + -arch arm64 \ + -project OpenVPNAdapter.xcodeproj + + - name: Create Universal Binary + run: | + cd OpenVPNAdapter/build/Release-macos + lipo -create -output OpenVPNAdapter.framework/OpenVPNAdapter \ + x86_64/OpenVPNAdapter.framework/OpenVPNAdapter \ + arm64/OpenVPNAdapter.framework/OpenVPNAdapter + - name: Remove CodeSignature run: | echo "Removing CodeSignature if exists..." From 929ed84d05f6b4229892a03fc2c23ad1159fc436 Mon Sep 17 00:00:00 2001 From: Macbook Date: Sat, 21 Dec 2024 16:15:25 +0700 Subject: [PATCH 14/43] [openvpnadapter] final buil --- .../workflows/build_openvpnadapter_apple.yml | 22 +------------------ 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index aae90f1..d635b3f 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -40,7 +40,7 @@ jobs: echo "Using macOS SDK version: $MACOSX_SDK" echo "::set-output name=sdk::$MACOSX_SDK" - - name: Build OpenVPNAdapter for x86_64 + - name: Build OpenVPNAdapter run: | cd OpenVPNAdapter export XCODEBUILD="/usr/bin/xcodebuild" @@ -49,28 +49,8 @@ jobs: -xcconfig Configuration/amnezia.xcconfig \ -sdk macosx${{ steps.sdk_version.outputs.sdk }} \ -destination 'generic/platform=macOS' \ - -arch x86_64 \ -project OpenVPNAdapter.xcodeproj - - name: Build OpenVPNAdapter for arm64 - run: | - cd OpenVPNAdapter - export XCODEBUILD="/usr/bin/xcodebuild" - $XCODEBUILD -scheme OpenVPNAdapter \ - -configuration Release \ - -xcconfig Configuration/amnezia.xcconfig \ - -sdk macosx${{ steps.sdk_version.outputs.sdk }} \ - -destination 'generic/platform=macOS' \ - -arch arm64 \ - -project OpenVPNAdapter.xcodeproj - - - name: Create Universal Binary - run: | - cd OpenVPNAdapter/build/Release-macos - lipo -create -output OpenVPNAdapter.framework/OpenVPNAdapter \ - x86_64/OpenVPNAdapter.framework/OpenVPNAdapter \ - arm64/OpenVPNAdapter.framework/OpenVPNAdapter - - name: Remove CodeSignature run: | echo "Removing CodeSignature if exists..." From ef54e55022a771587c6602f7c43e4d54c7546a0f Mon Sep 17 00:00:00 2001 From: Macbook Date: Mon, 30 Dec 2024 20:55:15 +0700 Subject: [PATCH 15/43] refactor macos ne --- .github/workflows/build_awg_macosne.yml | 45 ------------------------ .github/workflows/build_cloak.yml | 19 +++++----- .github/workflows/build_libssh_macos.yml | 24 ++++--------- 3 files changed, 16 insertions(+), 72 deletions(-) delete mode 100644 .github/workflows/build_awg_macosne.yml diff --git a/.github/workflows/build_awg_macosne.yml b/.github/workflows/build_awg_macosne.yml deleted file mode 100644 index e9a30da..0000000 --- a/.github/workflows/build_awg_macosne.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: awg-macos-network-extension - -on: [push] - -jobs: - Build-WG-macOS-NE: - name: 'AmneziaWG for macOS NE' - runs-on: macos-13 - if: | - contains(github.event.head_commit.message, '[all]') || - contains(github.event.head_commit.message, '[macos]') || - contains(github.event.head_commit.message, '[awg]') || - contains(github.event.head_commit.message, '[macos-ne-awg]') - - steps: - - name: 'Install dependencies' - run: brew install swiftlint - - - name: 'Setup/Update Go' - uses: actions/setup-go@v5 - with: - go-version: '>=1.22.1' - - - name: 'Get AmneziaWG' - uses: actions/checkout@v4 - with: - repository: amnezia-vpn/amneziawg-apple - ref: feature/xray-merge - path: awg-apple - - - name: 'Build WG x86_64 for macOS' - working-directory: awg-apple/Sources/WireGuardKitGo - run: | - ARCHS=x86_64 - PLATFORM_NAME=macosx - OUTPUT_DIR="${{ github.workspace }}/awg-apple/Sources/WireGuardKitGo/out" - TMP_DIR="${{ github.workspace }}/awg-apple/Sources/WireGuardKitGo/.tmp/wireguard-go-bridge" - make - - name: 'Archive artifacts' - uses: actions/upload-artifact@v4 - with: - name: awg-macos - path: ${{ github.workspace }}/awg-apple/Sources/WireGuardKitGo/out - if-no-files-found: error - retention-days: 7 \ No newline at end of file diff --git a/.github/workflows/build_cloak.yml b/.github/workflows/build_cloak.yml index cacd304..33f7296 100644 --- a/.github/workflows/build_cloak.yml +++ b/.github/workflows/build_cloak.yml @@ -94,15 +94,10 @@ jobs: if: | contains(github.event.head_commit.message, '[all]') || contains(github.event.head_commit.message, '[macos]') || - contains(github.event.head_commit.message, '[cloak]') || - contains(github.event.head_commit.message, '[cloak-macos]') + contains(github.event.head_commit.message, '[cloak]') - name: "Build Cloak MacOS plugin" + name: "Build Cloak Desktop plugin" steps: - - name: 'Install GO' - uses: actions/setup-go@v2 - with: - go-version: '^1.22' - name: Get Cloak uses: actions/checkout@v3 @@ -111,12 +106,16 @@ jobs: ref: master-amnezia path: Cloak - - name: Build for x86_64 MacOS + # - name: 'Run build script' + # working-directory: Cloak + # run: | + # CGO_ENABLED=1 GOOS="darwin" GOARCH="amd64" go build -v -o ./release/plugin/darwin/ck-ovpn-plugin.a -buildmode=c-archive ./cmd/ck-ovpn-plugin/ + - name: Build for x86_64 working-directory: Cloak run: | CGO_ENABLED=1 GOOS="darwin" GOARCH="amd64" go build -v -o ./release/plugin/darwin/ck-ovpn-plugin-x86_64.a -buildmode=c-archive ./cmd/ck-ovpn-plugin/ - - name: Build for arm64 MacOS + - name: Build for arm64 working-directory: Cloak run: | CGO_ENABLED=1 GOOS="darwin" GOARCH="arm64" go build -v -o ./release/plugin/darwin/ck-ovpn-plugin-arm64.a -buildmode=c-archive ./cmd/ck-ovpn-plugin/ @@ -242,4 +241,4 @@ jobs: file: desktop-plugin.zip tag: ${{ github.ref }} overwrite: true - file_glob: true + file_glob: true \ No newline at end of file diff --git a/.github/workflows/build_libssh_macos.yml b/.github/workflows/build_libssh_macos.yml index 6767c79..36db66e 100644 --- a/.github/workflows/build_libssh_macos.yml +++ b/.github/workflows/build_libssh_macos.yml @@ -21,7 +21,7 @@ jobs: contains(github.event.head_commit.message, '[libssh]') strategy: matrix: - arch: [arm64] + arch: [x86_64] # no-crypto=yes: builds version with all crypto disabled # no-crypto=no: builds version with all crypto enabled (where required dependencies are available) no_crypto: @@ -48,34 +48,24 @@ jobs: - name: Build zlib run: | cd zlib-${{env.ZLIB_VERSION}} - cmake . -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} + cmake . make zlibstatic cp ./libz.a ${{github.workspace}}/libssh-${{env.LIBSSH_VERSION}}/build/libz.a - name: Build openssl run: | cd openssl-${{env.OPENSSL_VERSION}} - ./Configure no-asm no-shared darwin64-${{ matrix.arch }}-cc + ./Configure no-asm no-shared darwin64-x86_64-cc make - name: Build libssh run: | cd libssh-${{env.LIBSSH_VERSION}}/build - cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} -DOPENSSL_USE_STATIC_LIBS=TRUE -DWITH_GSSAPI=OFF -DBUILD_SHARED_LIBS=OFF -DOPENSSL_ROOT_DIR=${{github.workspace}}/openssl-${{env.OPENSSL_VERSION}} -DZLIB_ROOT_DIR=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}} -DZLIB_LIBRARY=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}}/libz.a -DZLIB_INCLUDE=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}} + cmake .. -DCMAKE_BUILD_TYPE=Release -DOPENSSL_USE_STATIC_LIBS=TRUE -DWITH_GSSAPI=OFF -DBUILD_SHARED_LIBS=OFF -DOPENSSL_ROOT_DIR=${{github.workspace}}/openssl-${{env.OPENSSL_VERSION}} -DZLIB_ROOT_DIR=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}} -DZLIB_LIBRARY=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}}/libz.a -DZLIB_INCLUDE=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}} make ssh - make install - - name: Copy libssh.a to build directory - run: | - mkdir -p libssh-${{env.LIBSSH_VERSION}}/build/${{ matrix.arch }} - cp /usr/local/lib/libssh.a libssh-${{env.LIBSSH_VERSION}}/build/${{ matrix.arch }}/libssh.a - cp ${{ github.workspace }}/zlib-${{ env.ZLIB_VERSION }}/libz.a libssh-${{env.LIBSSH_VERSION}}/build/${{ matrix.arch }}/libz.a - - - name: List files in build directory - run: ls -la libssh-${{env.LIBSSH_VERSION}}/build/${{ matrix.arch }} - - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v2.2.4 with: name: libssh-macos-${{ matrix.arch }} path: ${{ github.workspace }}/libssh-${{env.LIBSSH_VERSION}}/build @@ -90,7 +80,7 @@ jobs: steps: - name: Setup | Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v2 - name: Setup | Artifacts uses: actions/download-artifact@v2 @@ -109,4 +99,4 @@ jobs: tag: ${{ github.ref }} overwrite: true file_glob: true - + \ No newline at end of file From 4c70dc0b0ef1cc557d28a99b87a2b58c5854c845 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 3 Jan 2025 23:17:08 +0700 Subject: [PATCH 16/43] refactor code --- .github/workflows/build_cloak.yml | 2 +- .github/workflows/build_libssh_macos.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_cloak.yml b/.github/workflows/build_cloak.yml index 33f7296..118231f 100644 --- a/.github/workflows/build_cloak.yml +++ b/.github/workflows/build_cloak.yml @@ -241,4 +241,4 @@ jobs: file: desktop-plugin.zip tag: ${{ github.ref }} overwrite: true - file_glob: true \ No newline at end of file + file_glob: true diff --git a/.github/workflows/build_libssh_macos.yml b/.github/workflows/build_libssh_macos.yml index 36db66e..1c01e15 100644 --- a/.github/workflows/build_libssh_macos.yml +++ b/.github/workflows/build_libssh_macos.yml @@ -99,4 +99,4 @@ jobs: tag: ${{ github.ref }} overwrite: true file_glob: true - \ No newline at end of file + From 3a6a7b5a8d8e0bdba8a569d43749d2e0a65a8590 Mon Sep 17 00:00:00 2001 From: Macbook Date: Thu, 9 Jan 2025 20:44:58 +0700 Subject: [PATCH 17/43] add github release [openvpnadapter] --- .../workflows/build_openvpnadapter_apple.yml | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index d635b3f..847ffb0 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -111,3 +111,46 @@ jobs: with: name: OpenVPNAdapter-ios path: OpenVPNAdapter/build/Release-iphoneos +github-release: + name: GitHub Release + needs: [build-macos, build-ios] + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + + steps: + - name: Setup | Checkout + uses: actions/checkout@v3 + + - name: Setup | Download macOS Artifact + uses: actions/download-artifact@v3 + with: + name: OpenVPNAdapter-macos + path: openvpnadapter-mac/ + + - name: Setup | Download iOS Artifact + uses: actions/download-artifact@v3 + with: + name: OpenVPNAdapter-ios + path: openvpnadapter-ios/ + + - name: Setup | Generate Checksums + run: | + for file in $(find ./ -type f -name '*.framework' -o -name '*.dylib'); do + openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256" + done + + - name: Zip macOS and iOS Artifacts + run: | + zip -r openvpnadapter-mac.zip openvpnadapter-mac/ + zip -r openvpnadapter-ios.zip openvpnadapter-ios/ + + - name: Upload Binaries to GitHub Release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref }} + overwrite: true + file: | + openvpnadapter-mac.zip + openvpnadapter-ios.zip + file_glob: false From 7ae49b14c1a31b37e07fec8a8dc02dc46152e4e4 Mon Sep 17 00:00:00 2001 From: Macbook Date: Thu, 9 Jan 2025 20:47:10 +0700 Subject: [PATCH 18/43] add github release [openvpnadapter] --- .../workflows/build_openvpnadapter_apple.yml | 86 +++++++++---------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index 847ffb0..0a1d7c9 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -111,46 +111,46 @@ jobs: with: name: OpenVPNAdapter-ios path: OpenVPNAdapter/build/Release-iphoneos -github-release: - name: GitHub Release - needs: [build-macos, build-ios] - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') - - steps: - - name: Setup | Checkout - uses: actions/checkout@v3 - - - name: Setup | Download macOS Artifact - uses: actions/download-artifact@v3 - with: - name: OpenVPNAdapter-macos - path: openvpnadapter-mac/ - - - name: Setup | Download iOS Artifact - uses: actions/download-artifact@v3 - with: - name: OpenVPNAdapter-ios - path: openvpnadapter-ios/ - - - name: Setup | Generate Checksums - run: | - for file in $(find ./ -type f -name '*.framework' -o -name '*.dylib'); do - openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256" - done - - - name: Zip macOS and iOS Artifacts - run: | - zip -r openvpnadapter-mac.zip openvpnadapter-mac/ - zip -r openvpnadapter-ios.zip openvpnadapter-ios/ - - - name: Upload Binaries to GitHub Release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - tag: ${{ github.ref }} - overwrite: true - file: | - openvpnadapter-mac.zip - openvpnadapter-ios.zip - file_glob: false + github-release: + name: GitHub Release + needs: [build-macos, build-ios] + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/') + + steps: + - name: Setup | Checkout + uses: actions/checkout@v3 + + - name: Setup | Download macOS Artifact + uses: actions/download-artifact@v3 + with: + name: OpenVPNAdapter-macos + path: openvpnadapter-mac/ + + - name: Setup | Download iOS Artifact + uses: actions/download-artifact@v3 + with: + name: OpenVPNAdapter-ios + path: openvpnadapter-ios/ + + - name: Setup | Generate Checksums + run: | + for file in $(find ./ -type f -name '*.framework' -o -name '*.dylib'); do + openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256" + done + + - name: Zip macOS and iOS Artifacts + run: | + zip -r openvpnadapter-mac.zip openvpnadapter-mac/ + zip -r openvpnadapter-ios.zip openvpnadapter-ios/ + + - name: Upload Binaries to GitHub Release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref }} + overwrite: true + file: | + openvpnadapter-mac.zip + openvpnadapter-ios.zip + file_glob: false From 5605d4e262e7ea6f7d18b7c473d0aab1b5499130 Mon Sep 17 00:00:00 2001 From: Macbook Date: Thu, 9 Jan 2025 20:53:30 +0700 Subject: [PATCH 19/43] test add github release [openvpnadapter] --- .github/workflows/build_openvpnadapter_apple.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index 0a1d7c9..f8910bb 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -115,7 +115,8 @@ jobs: name: GitHub Release needs: [build-macos, build-ios] runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') + # if: startsWith(github.ref, 'refs/tags/') + if: contains(github.event.head_commit.message, '[openvpnadapter]') steps: - name: Setup | Checkout From 265306e3fbdec525d58e939c6a6fdfb09cf3c833 Mon Sep 17 00:00:00 2001 From: Macbook Date: Thu, 9 Jan 2025 20:59:43 +0700 Subject: [PATCH 20/43] test add github release [openvpnadapter] --- .../workflows/build_openvpnadapter_apple.yml | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index f8910bb..4dff23f 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -133,17 +133,25 @@ jobs: with: name: OpenVPNAdapter-ios path: openvpnadapter-ios/ - + - name: Setup | Generate Checksums run: | - for file in $(find ./ -type f -name '*.framework' -o -name '*.dylib'); do - openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256" - done + find openvpnadapter-mac/ openvpnadapter-ios/ \ + -type f \( -name '*.framework' -o -name '*.dylib' \) \ + -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; - - name: Zip macOS and iOS Artifacts + - name: Zip macOS Artifacts run: | zip -r openvpnadapter-mac.zip openvpnadapter-mac/ + shell: bash + + - name: Zip iOS Artifacts + run: | zip -r openvpnadapter-ios.zip openvpnadapter-ios/ + shell: bash + + - name: List Generated Files + run: ls -l - name: Upload Binaries to GitHub Release uses: svenstaro/upload-release-action@v2 @@ -154,4 +162,4 @@ jobs: file: | openvpnadapter-mac.zip openvpnadapter-ios.zip - file_glob: false + file_glob: false \ No newline at end of file From aa7412bf009d975764f039098c4e6a474a69c1fb Mon Sep 17 00:00:00 2001 From: Macbook Date: Thu, 9 Jan 2025 21:11:07 +0700 Subject: [PATCH 21/43] test add github release [openvpnadapter] --- .github/workflows/build_openvpnadapter_apple.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index 4dff23f..33a5917 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -161,5 +161,4 @@ jobs: overwrite: true file: | openvpnadapter-mac.zip - openvpnadapter-ios.zip file_glob: false \ No newline at end of file From de6d7ac39504fab60e753e29f5df94acbed9e31f Mon Sep 17 00:00:00 2001 From: Macbook Date: Thu, 9 Jan 2025 21:21:02 +0700 Subject: [PATCH 22/43] test add github release [openvpnadapter] --- .../workflows/build_openvpnadapter_apple.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index 33a5917..36d9a2a 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -115,7 +115,6 @@ jobs: name: GitHub Release needs: [build-macos, build-ios] runs-on: ubuntu-latest - # if: startsWith(github.ref, 'refs/tags/') if: contains(github.event.head_commit.message, '[openvpnadapter]') steps: @@ -133,21 +132,22 @@ jobs: with: name: OpenVPNAdapter-ios path: openvpnadapter-ios/ - + - name: Setup | Generate Checksums run: | find openvpnadapter-mac/ openvpnadapter-ios/ \ -type f \( -name '*.framework' -o -name '*.dylib' \) \ -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; - - name: Zip macOS Artifacts + - name: Create Combined Folder run: | - zip -r openvpnadapter-mac.zip openvpnadapter-mac/ - shell: bash + mkdir -p openvpnadapter + cp -r openvpnadapter-mac/ openvpnadapter/ + cp -r openvpnadapter-ios/ openvpnadapter/ - - name: Zip iOS Artifacts + - name: Zip Combined Artifacts run: | - zip -r openvpnadapter-ios.zip openvpnadapter-ios/ + zip -r openvpnadapter.zip openvpnadapter/ shell: bash - name: List Generated Files @@ -159,6 +159,5 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} tag: ${{ github.ref }} overwrite: true - file: | - openvpnadapter-mac.zip - file_glob: false \ No newline at end of file + file: openvpnadapter.zip + file_glob: false From e3c66bfc7892ce8fefc12695ddd537555c6626e9 Mon Sep 17 00:00:00 2001 From: Macbook Date: Thu, 9 Jan 2025 21:32:46 +0700 Subject: [PATCH 23/43] final clean code for openvpn adapter for macos/ios --- .github/workflows/build_openvpnadapter_apple.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index 36d9a2a..e8fff58 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -115,7 +115,7 @@ jobs: name: GitHub Release needs: [build-macos, build-ios] runs-on: ubuntu-latest - if: contains(github.event.head_commit.message, '[openvpnadapter]') + if: startsWith(github.ref, 'refs/tags/') steps: - name: Setup | Checkout From 828a2d0306fda6ca5ec1b358fa995f262f5e2529 Mon Sep 17 00:00:00 2001 From: Macbook Date: Thu, 9 Jan 2025 21:52:46 +0700 Subject: [PATCH 24/43] remove non-dependent library [openvpnadapter] --- .github/workflows/build_openvpnadapter_apple.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index e8fff58..c7848b3 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -56,6 +56,10 @@ jobs: echo "Removing CodeSignature if exists..." rm -rf ./build/Release-macos/OpenVPNAdapter.framework/Versions/A/_CodeSignature rm -rf ./build/Release-macos/OpenVPNAdapter.framework/Versions/Current/_CodeSignature + rm -rf ./build/Release-macos/LZ4.framework + rm -rf ./build/Release-macos/OpenVPNClient.framework + rm -rf ./build/Release-macos/mbedTLS.framework + rm -rf ./build/Release-macos/OpenVPNAdapter.framework.dSYM - name: Archive Build uses: actions/upload-artifact@v3 @@ -105,7 +109,15 @@ jobs: -sdk iphoneos \ -destination 'generic/platform=iOS' \ -project OpenVPNAdapter.xcodeproj - + - name: Remove CodeSignature + run: | + echo "Removing CodeSignature if exists..." + rm -rf ./build/Release-iphoneos/OpenVPNAdapter.framework/Versions/A/_CodeSignature + rm -rf ./build/Release-iphoneos/OpenVPNAdapter.framework/Versions/Current/_CodeSignature + rm -rf ./build/Release-iphoneos/LZ4.framework + rm -rf ./build/Release-iphoneos/OpenVPNClient.framework + rm -rf ./build/Release-iphoneos/mbedTLS.framework + rm -rf ./build/Release-iphoneos/OpenVPNAdapter.framework.dSYM - name: Archive Build uses: actions/upload-artifact@v3 with: From 07e9e477c3acaf8ba26eccf2b182d77781777753 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 17 Jan 2025 21:27:52 +0700 Subject: [PATCH 25/43] add checksums --- .../workflows/build_openvpnadapter_apple.yml | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index c7848b3..67fdab4 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -60,6 +60,11 @@ jobs: rm -rf ./build/Release-macos/OpenVPNClient.framework rm -rf ./build/Release-macos/mbedTLS.framework rm -rf ./build/Release-macos/OpenVPNAdapter.framework.dSYM + - name: Generate Checksums for macOS + run: | + find ./build/Release-macos/ \ + -type f \( -name '*.framework' -o -name '*.dylib' \) \ + -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; - name: Archive Build uses: actions/upload-artifact@v3 @@ -118,6 +123,12 @@ jobs: rm -rf ./build/Release-iphoneos/OpenVPNClient.framework rm -rf ./build/Release-iphoneos/mbedTLS.framework rm -rf ./build/Release-iphoneos/OpenVPNAdapter.framework.dSYM + - name: Generate Checksums for iOS + run: | + find ./build/Release-iphoneos/ \ + -type f \( -name '*.framework' -o -name '*.dylib' \) \ + -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; + - name: Archive Build uses: actions/upload-artifact@v3 with: @@ -145,12 +156,6 @@ jobs: name: OpenVPNAdapter-ios path: openvpnadapter-ios/ - - name: Setup | Generate Checksums - run: | - find openvpnadapter-mac/ openvpnadapter-ios/ \ - -type f \( -name '*.framework' -o -name '*.dylib' \) \ - -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; - - name: Create Combined Folder run: | mkdir -p openvpnadapter From 3e916652de1ef7d4c45be9c2cb28696185a4ee68 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 17 Jan 2025 21:28:25 +0700 Subject: [PATCH 26/43] add checksums --- .github/workflows/build_openvpnadapter_apple.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index 67fdab4..5cfc0b4 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -177,4 +177,4 @@ jobs: tag: ${{ github.ref }} overwrite: true file: openvpnadapter.zip - file_glob: false + file_glob: false \ No newline at end of file From 81822087f7c232e318b26341827d9a4beddfac51 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 17 Jan 2025 21:28:36 +0700 Subject: [PATCH 27/43] add checksums [openvpnadapter] --- .github/workflows/build_openvpnadapter_apple.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index 5cfc0b4..db249bd 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -4,7 +4,7 @@ on: [push] jobs: build-macos: - name: 'OpenVPNAdapter for macOS NE' + name: 'OpenVPNAdapter for MacOS NE' runs-on: macos-latest if: | contains(github.event.head_commit.message, '[all]') || From e491c82cbc7af7753446765c8bbaeb1e7fc4c9e2 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 17 Jan 2025 21:34:44 +0700 Subject: [PATCH 28/43] add checksums [openvpnadapter] --- .../workflows/build_openvpnadapter_apple.yml | 34 +++++++++++-------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index db249bd..6f6b31a 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -4,7 +4,7 @@ on: [push] jobs: build-macos: - name: 'OpenVPNAdapter for MacOS NE' + name: 'OpenVPNAdapter for macOS NE' runs-on: macos-latest if: | contains(github.event.head_commit.message, '[all]') || @@ -53,16 +53,18 @@ jobs: - name: Remove CodeSignature run: | + export WORKINGDIR=`pwd` echo "Removing CodeSignature if exists..." - rm -rf ./build/Release-macos/OpenVPNAdapter.framework/Versions/A/_CodeSignature - rm -rf ./build/Release-macos/OpenVPNAdapter.framework/Versions/Current/_CodeSignature - rm -rf ./build/Release-macos/LZ4.framework - rm -rf ./build/Release-macos/OpenVPNClient.framework - rm -rf ./build/Release-macos/mbedTLS.framework - rm -rf ./build/Release-macos/OpenVPNAdapter.framework.dSYM + rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework/Versions/A/_CodeSignature + rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework/Versions/Current/_CodeSignature + rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/LZ4.framework + rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNClient.framework + rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/mbedTLS.framework + rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework.dSYM - name: Generate Checksums for macOS run: | - find ./build/Release-macos/ \ + export WORKINGDIR=`pwd` + find $WORKINGDIR/OpenVPNAdapter/build/Release-macos/ \ -type f \( -name '*.framework' -o -name '*.dylib' \) \ -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; @@ -116,16 +118,18 @@ jobs: -project OpenVPNAdapter.xcodeproj - name: Remove CodeSignature run: | + export WORKINGDIR=`pwd` echo "Removing CodeSignature if exists..." - rm -rf ./build/Release-iphoneos/OpenVPNAdapter.framework/Versions/A/_CodeSignature - rm -rf ./build/Release-iphoneos/OpenVPNAdapter.framework/Versions/Current/_CodeSignature - rm -rf ./build/Release-iphoneos/LZ4.framework - rm -rf ./build/Release-iphoneos/OpenVPNClient.framework - rm -rf ./build/Release-iphoneos/mbedTLS.framework - rm -rf ./build/Release-iphoneos/OpenVPNAdapter.framework.dSYM + rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNAdapter.framework/Versions/A/_CodeSignature + rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNAdapter.framework/Versions/Current/_CodeSignature + rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/LZ4.framework + rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNClient.framework + rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/mbedTLS.framework + rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNAdapter.framework.dSYM - name: Generate Checksums for iOS run: | - find ./build/Release-iphoneos/ \ + export WORKINGDIR=`pwd` + find $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/ \ -type f \( -name '*.framework' -o -name '*.dylib' \) \ -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; From fca2c240eba2b3e3db9b695de98aeb24931e45e9 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 17 Jan 2025 21:45:11 +0700 Subject: [PATCH 29/43] add checksums [openvpnadapter] --- .../workflows/build_openvpnadapter_apple.yml | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index 6f6b31a..695c1e7 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -61,12 +61,6 @@ jobs: rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNClient.framework rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/mbedTLS.framework rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework.dSYM - - name: Generate Checksums for macOS - run: | - export WORKINGDIR=`pwd` - find $WORKINGDIR/OpenVPNAdapter/build/Release-macos/ \ - -type f \( -name '*.framework' -o -name '*.dylib' \) \ - -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; - name: Archive Build uses: actions/upload-artifact@v3 @@ -126,12 +120,6 @@ jobs: rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNClient.framework rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/mbedTLS.framework rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNAdapter.framework.dSYM - - name: Generate Checksums for iOS - run: | - export WORKINGDIR=`pwd` - find $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/ \ - -type f \( -name '*.framework' -o -name '*.dylib' \) \ - -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; - name: Archive Build uses: actions/upload-artifact@v3 @@ -154,11 +142,23 @@ jobs: name: OpenVPNAdapter-macos path: openvpnadapter-mac/ + - name: Generate Checksums for macOS + run: | + find ./openvpnadapter-ios \ + -type f \( -name '*.framework' -o -name '*.dylib' \) \ + -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; + - name: Setup | Download iOS Artifact uses: actions/download-artifact@v3 with: name: OpenVPNAdapter-ios path: openvpnadapter-ios/ + + - name: Generate Checksums for iOS + run: | + find ./openvpnadapter-ios \ + -type f \( -name '*.framework' -o -name '*.dylib' \) \ + -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; - name: Create Combined Folder run: | From fb3aa17face3335265361272142be112417282fa Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 17 Jan 2025 22:06:32 +0700 Subject: [PATCH 30/43] add checksums [openvpnadapter] --- .github/workflows/build_openvpnadapter_apple.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index 695c1e7..c204916 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -130,7 +130,11 @@ jobs: name: GitHub Release needs: [build-macos, build-ios] runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/') + # if: startsWith(github.ref, 'refs/tags/') + if: | + contains(github.event.head_commit.message, '[all]') || + contains(github.event.head_commit.message, '[macos]') || + contains(github.event.head_commit.message, '[openvpnadapter]') steps: - name: Setup | Checkout @@ -144,7 +148,7 @@ jobs: - name: Generate Checksums for macOS run: | - find ./openvpnadapter-ios \ + find ./openvpnadapter-mac/ \ -type f \( -name '*.framework' -o -name '*.dylib' \) \ -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; @@ -156,7 +160,7 @@ jobs: - name: Generate Checksums for iOS run: | - find ./openvpnadapter-ios \ + find ./openvpnadapter-ios/ \ -type f \( -name '*.framework' -o -name '*.dylib' \) \ -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; From 93da31f8ce33060dcb52d18eea6d2408d52bae6b Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 17 Jan 2025 22:33:02 +0700 Subject: [PATCH 31/43] add checksums [openvpnadapter] --- .../workflows/build_openvpnadapter_apple.yml | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index c204916..fd3a975 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -10,6 +10,7 @@ jobs: contains(github.event.head_commit.message, '[all]') || contains(github.event.head_commit.message, '[macos]') || contains(github.event.head_commit.message, '[openvpnadapter]') + steps: - name: Checkout code uses: actions/checkout@v3 @@ -62,11 +63,18 @@ jobs: rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/mbedTLS.framework rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework.dSYM + - name: Generate Checksums for macOS + run: | + export WORKINGDIR=`pwd` + find $WORKINGDIR/OpenVPNAdapter/build/Release-macos/ \ + -type f \( -name '*.framework' -o -name '*.dylib' \) \ + -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; + - name: Archive Build uses: actions/upload-artifact@v3 with: name: OpenVPNAdapter-macos - path: OpenVPNAdapter/build/Release-macos + path: OpenVPNAdapter/build build-ios: name: 'OpenVPNAdapter for iOS' runs-on: macos-latest @@ -121,11 +129,18 @@ jobs: rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/mbedTLS.framework rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNAdapter.framework.dSYM + - name: Generate Checksums for iOS + run: | + export WORKINGDIR=`pwd` + find $WORKINGDIR/OpenVPNAdapter/build/Release-ios/ \ + -type f \( -name '*.framework' -o -name '*.dylib' \) \ + -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; + - name: Archive Build uses: actions/upload-artifact@v3 with: name: OpenVPNAdapter-ios - path: OpenVPNAdapter/build/Release-iphoneos + path: OpenVPNAdapter/build github-release: name: GitHub Release needs: [build-macos, build-ios] @@ -146,23 +161,11 @@ jobs: name: OpenVPNAdapter-macos path: openvpnadapter-mac/ - - name: Generate Checksums for macOS - run: | - find ./openvpnadapter-mac/ \ - -type f \( -name '*.framework' -o -name '*.dylib' \) \ - -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; - - name: Setup | Download iOS Artifact uses: actions/download-artifact@v3 with: name: OpenVPNAdapter-ios path: openvpnadapter-ios/ - - - name: Generate Checksums for iOS - run: | - find ./openvpnadapter-ios/ \ - -type f \( -name '*.framework' -o -name '*.dylib' \) \ - -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; - name: Create Combined Folder run: | From d54a4c9ae4b69ee4e6d01b0ec91b6df450d1f7be Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 17 Jan 2025 22:45:31 +0700 Subject: [PATCH 32/43] add checksums [openvpnadapter] --- .github/workflows/build_openvpnadapter_apple.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index fd3a975..440de55 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -132,7 +132,7 @@ jobs: - name: Generate Checksums for iOS run: | export WORKINGDIR=`pwd` - find $WORKINGDIR/OpenVPNAdapter/build/Release-ios/ \ + find $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/ \ -type f \( -name '*.framework' -o -name '*.dylib' \) \ -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; From 5aff7d7d523d8863cc417ced5a517752f58ab179 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 17 Jan 2025 23:00:47 +0700 Subject: [PATCH 33/43] add checksums [openvpnadapter-ios] --- .../workflows/build_openvpnadapter_apple.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index 440de55..dc40cda 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -81,6 +81,7 @@ jobs: if: | contains(github.event.head_commit.message, '[all]') || contains(github.event.head_commit.message, '[ios]') || + contains(github.event.head_commit.message, '[openvpnadapter-ios]') || contains(github.event.head_commit.message, '[openvpnadapter]') steps: @@ -129,18 +130,24 @@ jobs: rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/mbedTLS.framework rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNAdapter.framework.dSYM - - name: Generate Checksums for iOS + - name: Generate Checksums for OpenVPNAdapter.framework run: | export WORKINGDIR=`pwd` - find $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/ \ - -type f \( -name '*.framework' -o -name '*.dylib' \) \ - -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; + if [ -d "$WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNAdapter.framework" ]; then + echo "Generating checksums for OpenVPNAdapter.framework..." + find $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNAdapter.framework \ + -type f \ + -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; + else + echo "Directory $WORKINGDIR/OpenVPNAdapter/build/Release-iphoneos/OpenVPNAdapter.framework does not exist." + exit 1 + fi - name: Archive Build uses: actions/upload-artifact@v3 with: name: OpenVPNAdapter-ios - path: OpenVPNAdapter/build + path: OpenVPNAdapter/build/Release-iphoneos github-release: name: GitHub Release needs: [build-macos, build-ios] From fbc1118e53849b1f70fa924a65ddc92cc04772b1 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 17 Jan 2025 23:07:57 +0700 Subject: [PATCH 34/43] add checksums [openvpnadapter-ios] --- .github/workflows/build_openvpnadapter_apple.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index dc40cda..5df69cb 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -63,18 +63,24 @@ jobs: rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/mbedTLS.framework rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework.dSYM - - name: Generate Checksums for macOS + - name: Generate Checksums for OpenVPNAdapter.framework run: | export WORKINGDIR=`pwd` - find $WORKINGDIR/OpenVPNAdapter/build/Release-macos/ \ - -type f \( -name '*.framework' -o -name '*.dylib' \) \ - -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; + if [ -d "$WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework" ]; then + echo "Generating checksums for OpenVPNAdapter.framework..." + find $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework \ + -type f \ + -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; + else + echo "Directory $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework does not exist." + exit 1 + fi - name: Archive Build uses: actions/upload-artifact@v3 with: name: OpenVPNAdapter-macos - path: OpenVPNAdapter/build + path: OpenVPNAdapter/build/Realease-macos build-ios: name: 'OpenVPNAdapter for iOS' runs-on: macos-latest From 3e43212c0aa52d37859552251f164f1d0afe2252 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 17 Jan 2025 23:08:30 +0700 Subject: [PATCH 35/43] add checksums [openvpnadapter] --- .github/workflows/build_openvpnadapter_apple.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index 5df69cb..7527c6c 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -81,6 +81,7 @@ jobs: with: name: OpenVPNAdapter-macos path: OpenVPNAdapter/build/Realease-macos + build-ios: name: 'OpenVPNAdapter for iOS' runs-on: macos-latest From ac8097dc62ea7063a97a1d7e051870dd47ba1214 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 17 Jan 2025 23:13:00 +0700 Subject: [PATCH 36/43] add checksums [openvpnadapter] --- .github/workflows/build_openvpnadapter_apple.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index 7527c6c..9038c8e 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -80,8 +80,8 @@ jobs: uses: actions/upload-artifact@v3 with: name: OpenVPNAdapter-macos - path: OpenVPNAdapter/build/Realease-macos - + path: OpenVPNAdapter/build/Release-macos + build-ios: name: 'OpenVPNAdapter for iOS' runs-on: macos-latest From cdee5bb41e93124c6ee2561156dd1c1adff23c97 Mon Sep 17 00:00:00 2001 From: Macbook Date: Fri, 17 Jan 2025 23:22:36 +0700 Subject: [PATCH 37/43] Final openvpn adapter with checksums --- .github/workflows/build_openvpnadapter_apple.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index 9038c8e..dfa3cc2 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -159,11 +159,7 @@ jobs: name: GitHub Release needs: [build-macos, build-ios] runs-on: ubuntu-latest - # if: startsWith(github.ref, 'refs/tags/') - if: | - contains(github.event.head_commit.message, '[all]') || - contains(github.event.head_commit.message, '[macos]') || - contains(github.event.head_commit.message, '[openvpnadapter]') + if: startsWith(github.ref, 'refs/tags/') steps: - name: Setup | Checkout From d236f1a33548673f5c444f927a07a6bad26666f7 Mon Sep 17 00:00:00 2001 From: Macbook Date: Sat, 18 Jan 2025 22:07:27 +0700 Subject: [PATCH 38/43] change commit for ios [openvpnadapter] --- .github/workflows/build_openvpnadapter_apple.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index dfa3cc2..480ca0c 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -99,7 +99,7 @@ jobs: uses: actions/checkout@v3 with: repository: amnezia-vpn/OpenVPNAdapter - ref: master + ref: 7c821a8d5c1ad5ad94e0763b4f25a875b5a6fe1b path: OpenVPNAdapter - name: Configure amnezia.xcconfig From 4da93e0753d8e1a1e3053fc558dccfd1fb80f4bf Mon Sep 17 00:00:00 2001 From: Macbook Date: Sat, 18 Jan 2025 22:17:09 +0700 Subject: [PATCH 39/43] add submodule [openvpnadapter] --- .github/workflows/build_openvpnadapter_apple.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index 480ca0c..a4a76a5 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -94,6 +94,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + with: + submodules: recursive - name: 'Get OpenVPNAdapter' uses: actions/checkout@v3 @@ -101,6 +103,7 @@ jobs: repository: amnezia-vpn/OpenVPNAdapter ref: 7c821a8d5c1ad5ad94e0763b4f25a875b5a6fe1b path: OpenVPNAdapter + submodules: recursive - name: Configure amnezia.xcconfig run: | From d7684f3380c79eb906a8d467690a9d59aa4ebfef Mon Sep 17 00:00:00 2001 From: Yaroslav Yashin Date: Wed, 29 Jan 2025 17:22:13 +0100 Subject: [PATCH 40/43] trailing line at the end of the file added --- .github/workflows/build_openvpnadapter_apple.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index a4a76a5..b57d117 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -201,4 +201,4 @@ jobs: tag: ${{ github.ref }} overwrite: true file: openvpnadapter.zip - file_glob: false \ No newline at end of file + file_glob: false From 3e77ce8fdb28c8145274389216c782273e339125 Mon Sep 17 00:00:00 2001 From: Yaroslav Yashin Date: Thu, 30 Jan 2025 15:25:39 +0100 Subject: [PATCH 41/43] chore: iOS OpenVPNAdapter commit to build on updated, CODE_SIGNING_ALLOWED disabled, failing macOS build deleted --- .../workflows/build_openvpnadapter_apple.yml | 92 ++----------------- 1 file changed, 9 insertions(+), 83 deletions(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index b57d117..b0968c3 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -3,85 +3,6 @@ name: Build OpenVPNAdapter for Apple on: [push] jobs: - build-macos: - name: 'OpenVPNAdapter for macOS NE' - runs-on: macos-latest - if: | - contains(github.event.head_commit.message, '[all]') || - contains(github.event.head_commit.message, '[macos]') || - contains(github.event.head_commit.message, '[openvpnadapter]') - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: 'Get OpenVPNAdapter' - uses: actions/checkout@v3 - with: - repository: amnezia-vpn/OpenVPNAdapter - ref: feature/macox-network-extension - path: OpenVPNAdapter - - - name: Configure amnezia.xcconfig - run: | - export WORKINGDIR=`pwd` - echo "Working directory: $WORKINGDIR" - echo "Configuring amnezia.xcconfig..." - cat $WORKINGDIR/OpenVPNAdapter/Configuration/Project-MacNE.xcconfig > $WORKINGDIR/OpenVPNAdapter/Configuration/amnezia.xcconfig - cat << EOF >> $WORKINGDIR/OpenVPNAdapter/Configuration/amnezia.xcconfig - PROJECT_TEMP_DIR = $WORKINGDIR/OpenVPNAdapter/build/OpenVPNAdapter.build - CONFIGURATION_BUILD_DIR = $WORKINGDIR/OpenVPNAdapter/build/Release-macos - BUILT_PRODUCTS_DIR = $WORKINGDIR/OpenVPNAdapter/build/Release-macos - EOF - - - name: Get macOS SDK - id: sdk_version - run: | - MACOSX_SDK=$(xcrun --sdk macosx --show-sdk-path | sed -E 's/.*MacOSX([0-9]+\.[0-9]+)\.sdk/\1/') - echo "Using macOS SDK version: $MACOSX_SDK" - echo "::set-output name=sdk::$MACOSX_SDK" - - - name: Build OpenVPNAdapter - run: | - cd OpenVPNAdapter - export XCODEBUILD="/usr/bin/xcodebuild" - $XCODEBUILD -scheme OpenVPNAdapter \ - -configuration Release \ - -xcconfig Configuration/amnezia.xcconfig \ - -sdk macosx${{ steps.sdk_version.outputs.sdk }} \ - -destination 'generic/platform=macOS' \ - -project OpenVPNAdapter.xcodeproj - - - name: Remove CodeSignature - run: | - export WORKINGDIR=`pwd` - echo "Removing CodeSignature if exists..." - rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework/Versions/A/_CodeSignature - rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework/Versions/Current/_CodeSignature - rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/LZ4.framework - rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNClient.framework - rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/mbedTLS.framework - rm -rf $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework.dSYM - - - name: Generate Checksums for OpenVPNAdapter.framework - run: | - export WORKINGDIR=`pwd` - if [ -d "$WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework" ]; then - echo "Generating checksums for OpenVPNAdapter.framework..." - find $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework \ - -type f \ - -exec sh -c 'openssl dgst -sha256 -r "$1" > "$1.sha256"' _ {} \; - else - echo "Directory $WORKINGDIR/OpenVPNAdapter/build/Release-macos/OpenVPNAdapter.framework does not exist." - exit 1 - fi - - - name: Archive Build - uses: actions/upload-artifact@v3 - with: - name: OpenVPNAdapter-macos - path: OpenVPNAdapter/build/Release-macos - build-ios: name: 'OpenVPNAdapter for iOS' runs-on: macos-latest @@ -101,7 +22,7 @@ jobs: uses: actions/checkout@v3 with: repository: amnezia-vpn/OpenVPNAdapter - ref: 7c821a8d5c1ad5ad94e0763b4f25a875b5a6fe1b + ref: 66e6e922a9b58f04aa89087fcc1f9602d2025707 path: OpenVPNAdapter submodules: recursive @@ -128,7 +49,11 @@ jobs: -xcconfig Configuration/amnezia.xcconfig \ -sdk iphoneos \ -destination 'generic/platform=iOS' \ - -project OpenVPNAdapter.xcodeproj + -project OpenVPNAdapter.xcodeproj \ + CODE_SIGNING_ALLOWED=NO + + # With CODE_SIGNING_ALLOWED=NO this part is redundant, but it's not just signatures are being deleted here, + # It's also dependant frameworks and debyg symbols. - name: Remove CodeSignature run: | export WORKINGDIR=`pwd` @@ -157,10 +82,11 @@ jobs: uses: actions/upload-artifact@v3 with: name: OpenVPNAdapter-ios - path: OpenVPNAdapter/build/Release-iphoneos + path: 'OpenVPNAdapter/build/Release-iphoneos' + github-release: name: GitHub Release - needs: [build-macos, build-ios] + needs: [build-ios] runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/') From 543845f1ace67f5d16b12e872fa2424f4f0e48b0 Mon Sep 17 00:00:00 2001 From: Yaroslav Yashin Date: Fri, 31 Jan 2025 10:38:48 +0100 Subject: [PATCH 42/43] Review fixes --- .github/workflows/build_openvpnadapter_apple.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index b0968c3..b601173 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v3 with: repository: amnezia-vpn/OpenVPNAdapter - ref: 66e6e922a9b58f04aa89087fcc1f9602d2025707 + ref: master-amnezia path: OpenVPNAdapter submodules: recursive From 312d8cd421a9eabda7c5bdf63509976fcc9cccc7 Mon Sep 17 00:00:00 2001 From: pokamest Date: Fri, 31 Jan 2025 15:01:16 +0000 Subject: [PATCH 43/43] Fix typo --- .github/workflows/build_openvpnadapter_apple.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_openvpnadapter_apple.yml b/.github/workflows/build_openvpnadapter_apple.yml index b601173..b597f7e 100644 --- a/.github/workflows/build_openvpnadapter_apple.yml +++ b/.github/workflows/build_openvpnadapter_apple.yml @@ -53,7 +53,7 @@ jobs: CODE_SIGNING_ALLOWED=NO # With CODE_SIGNING_ALLOWED=NO this part is redundant, but it's not just signatures are being deleted here, - # It's also dependant frameworks and debyg symbols. + # It's also dependant frameworks and debug symbols. - name: Remove CodeSignature run: | export WORKINGDIR=`pwd`