Skip to content

Commit 5953b18

Browse files
committed
feat: add support arm64 [windows-libssh] [tun2socks] [xray] [cloak] [openvpn] [windows-openssl]
1 parent 199ec07 commit 5953b18

File tree

7 files changed

+128
-53
lines changed

7 files changed

+128
-53
lines changed

.github/workflows/build_awg_windows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
mkdir build
2828
move x64 build\x64
2929
move x86 build\x86
30+
move arm64 build\arm64
3031
3132
- name: 'Archive artifacts'
3233
uses: actions/upload-artifact@v4

.github/workflows/build_cloak.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,15 @@ jobs:
4646
- name: 'Build desktop Cloak plugin'
4747
working-directory: Cloak
4848
run: |
49-
sudo apt-get install gcc-mingw-w64
50-
mkdir ./release/plugin
51-
mkdir ./release/plugin/linux
49+
sudo apt-get update
50+
sudo apt-get install -y gcc-mingw-w64 gcc-mingw-w64-x86-64 gcc-mingw-w64-aarch64
51+
mkdir -p ./release/plugin
52+
mkdir -p ./release/plugin/linux
5253
CGO_ENABLED=1 GOOS="linux" GOARCH="amd64" go build -v -o ./release/plugin/linux/ck-ovpn-plugin.a -buildmode=c-archive ./cmd/ck-ovpn-plugin/
53-
mkdir ./release/plugin/windows
54-
CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS="windows" GOARCH="amd64" go build -v -o ./release/plugin/windows/ck-ovpn-plugin.dll -buildmode=c-shared ./cmd/ck-ovpn-plugin/
54+
mkdir -p ./release/plugin/windows
55+
CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc GOOS="windows" GOARCH="amd64" go build -v -o ./release/plugin/windows/ck-ovpn-plugin.dll -buildmode=c-shared ./cmd/ck-ovpn-plugin/
56+
mkdir -p ./release/plugin/windows-arm64
57+
CGO_ENABLED=1 CC=aarch64-w64-mingw32-gcc GOOS="windows" GOARCH="arm64" go build -v -o ./release/plugin/windows-arm64/ck-ovpn-plugin.dll -buildmode=c-shared ./cmd/ck-ovpn-plugin/
5558
5659
- name: Archive Linux client binary
5760
uses: actions/upload-artifact@v4

.github/workflows/build_libssh_windows.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
contains(github.event.head_commit.message, '[libssh]')
2222
strategy:
2323
matrix:
24-
arch: [x86, x86_64]
24+
arch: [x86, x86_64, arm64]
2525
# no-crypto=yes: builds version with all crypto disabled
2626
# no-crypto=no: builds version with all crypto enabled (where required dependencies are available)
2727
no_crypto:
@@ -35,13 +35,14 @@ jobs:
3535
# uses: ilammy/msvc-dev-cmd@d8610e2b41c6d0f0c3b4c46dad8df0fd826c68e1
3636
uses: ilammy/[email protected]
3737
with:
38-
arch: ${{ matrix.arch }}
38+
arch: ${{ matrix.arch == 'arm64' && 'amd64_arm64' || matrix.arch }}
3939
toolset: ${{ matrix.toolset }}
4040
#sdk: # use the latest
4141
#spectre: # set true to use VC libraries with sepctre mitigations
4242

4343
- uses: ilammy/[email protected]
4444
name: Install NASM
45+
if: matrix.arch != 'arm64'
4546
- uses: shogo82148/actions-setup-perl@v1
4647
name: Install PERL
4748
with:
@@ -87,13 +88,20 @@ jobs:
8788
8889
shell: powershell
8990

90-
- name: Build zlib
91+
- name: Build zlib x86/x64
92+
if: matrix.arch != 'arm64'
9193
shell: cmd
9294
run: |
9395
cd zlib\${{env.ZLIB_VERSION}}
94-
cmake .
9596
nmake -f win32\Makefile.msc
9697
98+
- name: Build zlib ARM64
99+
if: matrix.arch == 'arm64'
100+
shell: cmd
101+
run: |
102+
cd zlib\${{env.ZLIB_VERSION}}
103+
nmake -f win32\Makefile.msc zlib.lib
104+
97105
- name: Build openssl x86
98106
if: matrix.arch == 'x86'
99107
shell: powershell
@@ -114,6 +122,14 @@ jobs:
114122
perl Configure VC-WIN64A no-tests no-shared --with-zlib-include=${{github.workspace}}\zlib\${{env.ZLIB_VERSION}}
115123
nmake
116124
125+
- name: Build openssl ARM64
126+
if: matrix.arch == 'arm64'
127+
shell: powershell
128+
run: |
129+
cd openssl\${{env.OPENSSL_VERSION}}
130+
perl Configure VC-WIN64-ARM no-tests no-shared no-asm --with-zlib-include=${{github.workspace}}\zlib\${{env.ZLIB_VERSION}}
131+
nmake
132+
117133
- name: Build libssh
118134
shell: powershell
119135
run: |
@@ -122,7 +138,7 @@ jobs:
122138
nmake ssh
123139
124140
- name: Upload Artifact
125-
uses: actions/upload-artifact@v2.2.4
141+
uses: actions/upload-artifact@v4
126142
with:
127143
name: libssh-win-${{ matrix.arch }}
128144
path: ${{ github.workspace }}\libssh\${{env.LIBSSH_VERSION}}\build

.github/workflows/build_openssl_windows.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
arch:
1818
- amd64
1919
- amd64_x86
20+
- amd64_arm64
2021
shared:
2122
- shared
2223
- no-shared
@@ -83,6 +84,29 @@ jobs:
8384
mkdir build/win64
8485
move libcrypto-3-x64.dll build/win64
8586
move libssl-3-x64.dll build/win64
87+
- name: Build OpenSSL ARM64
88+
if: matrix.arch == 'amd64_arm64' && matrix.shared == 'no-shared'
89+
run: |
90+
cd openssl
91+
92+
perl Configure no-tests no-shared VC-WIN64-ARM
93+
nmake
94+
mkdir build
95+
mkdir build/arm64
96+
move libcrypto.lib build/arm64
97+
move libssl.lib build/arm64
98+
move include build/include
99+
- name: Build Shared OpenSSL ARM64
100+
if: matrix.arch == 'amd64_arm64' && matrix.shared == 'shared'
101+
run: |
102+
cd openssl
103+
104+
perl Configure no-tests VC-WIN64-ARM
105+
nmake
106+
mkdir build
107+
mkdir build/arm64
108+
move libcrypto-3-arm64.dll build/arm64
109+
move libssl-3-arm64.dll build/arm64
86110
- name: Archive Windows OpenSSL libs
87111
uses: actions/upload-artifact@v4
88112
with:

.github/workflows/build_openvpn_windows.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ jobs:
3131
contains(github.event.head_commit.message, '[openvpn]')
3232
3333
steps:
34-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
3535

3636
- name: 'Get openvpn'
37-
uses: actions/checkout@v3
37+
uses: actions/checkout@v4
3838
with:
3939
repository: OpenVPN/openvpn
4040
ref: release/2.5
@@ -70,7 +70,7 @@ jobs:
7070
msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform="${{ matrix.plat }}" .
7171
7272
- name: Archive artifacts
73-
uses: actions/upload-artifact@v3
73+
uses: actions/upload-artifact@v4
7474
with:
7575
name: openvpn-win-${{ matrix.plat }}
7676
path: |
@@ -82,7 +82,12 @@ jobs:
8282
openvpn3-msvc:
8383
strategy:
8484
matrix:
85-
arch: [amd64]
85+
arch: [amd64, amd64_arm64]
86+
include:
87+
- arch: amd64
88+
platform: x64
89+
- arch: amd64_arm64
90+
platform: ARM64
8691

8792
env:
8893
VCPKG_ROOT: ${{ github.workspace }}/openvpn3/vcpkg
@@ -96,7 +101,7 @@ jobs:
96101
contains(github.event.head_commit.message, '[windows-openvpn]') ||
97102
contains(github.event.head_commit.message, '[openvpn]')
98103
steps:
99-
- uses: actions/checkout@v3
104+
- uses: actions/checkout@v4
100105

101106
- uses: lukka/get-cmake@latest
102107
- uses: ilammy/msvc-dev-cmd@v1
@@ -105,7 +110,7 @@ jobs:
105110
arch: ${{ matrix.arch }}
106111

107112
- name: 'Get openvpn3'
108-
uses: actions/checkout@v3
113+
uses: actions/checkout@v4
109114
with:
110115
repository: amnezia-vpn/openvpn3
111116
ref: win-amezia
@@ -116,12 +121,12 @@ jobs:
116121
run: |
117122
git clone https://github.com/Microsoft/vcpkg.git
118123
./vcpkg/bootstrap-vcpkg.bat
119-
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/openvpn3/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_OVERLAY_PORTS="${{ github.workspace }}/openvpn3/deps/vcpkg-ports"
124+
cmake -B build -S . -A ${{ matrix.platform }} -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/openvpn3/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_OVERLAY_PORTS="${{ github.workspace }}/openvpn3/deps/vcpkg-ports"
120125
cmake --build build --config Release --target ovpncli
121126
122-
- uses: actions/upload-artifact@v2
127+
- uses: actions/upload-artifact@v4
123128
with:
124-
name: openvpn3-win
129+
name: openvpn3-win-${{ matrix.platform }}
125130
path: |
126131
${{ env.buildDir }}/**/*.exe
127132
${{ env.buildDir }}/**/*.dll
@@ -138,10 +143,10 @@ jobs:
138143

139144
steps:
140145
- name: Setup | Checkout
141-
uses: actions/checkout@v2
146+
uses: actions/checkout@v4
142147

143148
- name: Setup | Artifacts
144-
uses: actions/download-artifact@v2
149+
uses: actions/download-artifact@v4
145150

146151
- name: Setup | Checksums
147152
run: for file in $(find ./ -name '*.exe' -or -name '*.dll' ); do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
@@ -184,10 +189,10 @@ jobs:
184189

185190
steps:
186191
- name: Setup | Checkout
187-
uses: actions/checkout@v2
192+
uses: actions/checkout@v4
188193

189194
- name: Setup | Artifacts
190-
uses: actions/download-artifact@v2
195+
uses: actions/download-artifact@v4
191196

192197
- name: Setup | Checksums
193198
run: for file in $(find ./ -name '*.exe' -or -name '*.dll' ); do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
@@ -199,7 +204,7 @@ jobs:
199204
uses: svenstaro/upload-release-action@v2
200205
with:
201206
repo_token: ${{ secrets.GITHUB_TOKEN }}
202-
file: openvpn3-win.zip
207+
file: openvpn3-win-*.zip
203208
tag: ${{ github.ref }}
204209
overwrite: true
205210
file_glob: true

.github/workflows/build_tun2socks.yml

Lines changed: 51 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,34 @@ jobs:
66
Build-Tun2Socks:
77
permissions:
88
contents: write
9-
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
include:
12+
- os: ubuntu-latest
13+
goarch: amd64
14+
goos: linux
15+
name: linux-amd64
16+
- os: ubuntu-latest
17+
goarch: arm64
18+
goos: linux
19+
name: linux-arm64
20+
- os: ubuntu-latest
21+
goarch: amd64
22+
goos: windows
23+
name: windows-amd64
24+
- os: ubuntu-latest
25+
goarch: arm64
26+
goos: windows
27+
name: windows-arm64
28+
- os: ubuntu-latest
29+
goarch: amd64
30+
goos: darwin
31+
name: macos-amd64
32+
- os: ubuntu-latest
33+
goarch: arm64
34+
goos: darwin
35+
name: macos-arm64
36+
runs-on: ${{ matrix.os }}
1037
if: |
1138
contains(github.event.head_commit.message, '[all]') ||
1239
contains(github.event.head_commit.message, '[windows]') ||
@@ -37,43 +64,40 @@ jobs:
3764
cd tun2socks
3865
go mod download
3966
40-
- name: Build Tun2Socks
67+
- name: Build Tun2Socks for ${{ matrix.name }}
68+
env:
69+
GOOS: ${{ matrix.goos }}
70+
GOARCH: ${{ matrix.goarch }}
71+
CGO_ENABLED: 0
4172
run: |
4273
cd tun2socks
43-
make -j releases
44-
cd build
45-
unzip \*.zip
46-
rm *.zip
47-
48-
- name: Upload files to Artifacts
49-
uses: actions/upload-artifact@v4
50-
with:
51-
name: tun2socks
52-
path: tun2socks/build
74+
mkdir -p build
75+
if [ "${{ matrix.goos }}" = "windows" ]; then
76+
go build -v -trimpath -ldflags "-s -w -buildid=" -o build/tun2socks-${{ matrix.goos }}-${{ matrix.goarch }}.exe
77+
else
78+
go build -v -trimpath -ldflags "-s -w -buildid=" -o build/tun2socks-${{ matrix.goos }}-${{ matrix.goarch }}
79+
fi
5380
5481
- name: Setup | Checksums
55-
run: for file in $(find ./tun2socks/build -name '*' ); do openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"; done
56-
57-
- name: Create ZIP archive
58-
shell: bash
5982
run: |
60-
cd tun2socks
61-
pushd build || exit 1
62-
touch -mt $(date +%Y01010000) *
63-
zip -9vr ../tun2socks.zip .
64-
popd || exit 1
65-
FILE=./tun2socks.zip
66-
DGST=$FILE.dgst
67-
for METHOD in {"md5","sha1","sha256","sha512"}
68-
do
69-
openssl dgst -$METHOD $FILE | sed 's/([^)]*)//g' >>$DGST
83+
cd tun2socks/build
84+
for file in tun2socks-*; do
85+
openssl dgst -sha256 -r "$file" | awk '{print $1}' > "${file}.sha256"
7086
done
7187
88+
- name: Upload files to Artifacts
89+
uses: actions/upload-artifact@v4
90+
with:
91+
name: tun2socks-${{ matrix.name }}
92+
path: |
93+
tun2socks/build/tun2socks-*
94+
tun2socks/build/*.sha256
95+
7296
- name: Upload binaries to release
7397
uses: svenstaro/upload-release-action@v2
7498
if: startsWith(github.ref, 'refs/tags/')
7599
with:
76100
repo_token: ${{ secrets.GITHUB_TOKEN }}
77-
file: tun2socks/tun2socks.zip*
101+
file: tun2socks/build/tun2socks-*
78102
tag: ${{ github.ref }}
79103
file_glob: true

.github/workflows/build_xray.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,11 @@ jobs:
8686
- goos: android
8787
goarch: arm64
8888
# END Android ARM 8
89+
# BEGIN Windows ARM64
90+
- goos: windows
91+
goarch: arm64
92+
# END Windows ARM64
8993
# Windows ARM
90-
#- goos: windows
91-
# goarch: arm64
9294
# - goos: windows
9395
# goarch: arm
9496
# goarm: 7

0 commit comments

Comments
 (0)