Skip to content

Commit 4b14dbd

Browse files
committed
set hev-socks5-tunnel
1 parent 4b3b374 commit 4b14dbd

File tree

2 files changed

+16
-29
lines changed

2 files changed

+16
-29
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -31,35 +31,9 @@ jobs:
3131
- name: Install NDK
3232
run: |
3333
echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager \
34-
--channel=3 \
35-
--install "ndk;29.0.13113456"
36-
echo "NDK_HOME=$ANDROID_HOME/ndk/29.0.13113456" >> $GITHUB_ENV
37-
sed -i '10i\
38-
\
39-
ndkVersion = "29.0.13113456"' ${{ github.workspace }}/V2rayNG/app/build.gradle.kts
40-
41-
- name: Restore cached libtun2socks
42-
id: cache-libtun2socks-restore
43-
uses: actions/cache/restore@v4
44-
with:
45-
path: ${{ github.workspace }}/libs
46-
key: libtun2socks-${{ runner.os }}-${{ env.NDK_HOME }}-${{ hashFiles('.git/modules/badvpn/HEAD') }}-${{ hashFiles('.git/modules/libancillary/HEAD') }}
47-
48-
- name: Build libtun2socks
49-
if: steps.cache-libtun2socks-restore.outputs.cache-hit != 'true'
50-
run: |
51-
bash compile-tun2socks.sh
52-
53-
- name: Save libtun2socks
54-
if: steps.cache-libtun2socks-restore.outputs.cache-hit != 'true'
55-
uses: actions/cache/save@v4
56-
with:
57-
path: ${{ github.workspace }}/libs
58-
key: libtun2socks-${{ runner.os }}-${{ env.NDK_HOME }}-${{ hashFiles('.git/modules/badvpn/HEAD') }}-${{ hashFiles('.git/modules/libancillary/HEAD') }}
59-
60-
- name: Copy libtun2socks
61-
run: |
62-
cp -r ${{ github.workspace }}/libs ${{ github.workspace }}/V2rayNG/app
34+
--channel=0 \
35+
--install "ndk;28.2.13676358"
36+
echo "NDK_HOME=$ANDROID_HOME/ndk/28.2.13676358" >> $GITHUB_ENV
6337
6438
- name: Fetch AndroidLibXrayLite tag
6539
run: |

V2rayNG/app/build.gradle.kts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,21 @@ android {
3535
}
3636
}
3737

38+
externalNativeBuild {
39+
ndkVersion = "28.2.13676358"
40+
ndkBuild {
41+
arguments("APP_CFLAGS+=-DPKGNAME=com/v2ray/ang/service -DCLSNAME=Tun2SocksService -ffile-prefix-map=${rootDir}=.") \
42+
}
43+
}
44+
3845
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
3946
}
47+
48+
externalNativeBuild {
49+
ndkBuild {
50+
path = file("src/main/jni/Android.mk")
51+
}
52+
}
4053

4154
buildTypes {
4255
release {

0 commit comments

Comments
 (0)