mirror of https://github.com/NekoX-Dev/NekoX.git
Update v2ray-core
This commit is contained in:
parent
e01fe0d361
commit
a6c0bca680
|
@ -152,7 +152,7 @@ jobs:
|
|||
uses: actions/setup-go@v2
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
go-version: 1.15
|
||||
go-version: 1.16
|
||||
- name: Native Build
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run libs v2ray
|
||||
|
|
|
@ -167,7 +167,7 @@ jobs:
|
|||
uses: actions/setup-go@v2
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
with:
|
||||
go-version: 1.15
|
||||
go-version: 1.16
|
||||
- name: Native Build
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
run: ./run libs v2ray
|
||||
|
|
|
@ -83,10 +83,10 @@ Consider using a Linux VM or dual booting.**
|
|||
|
||||
It is recommended to use [AndroidStudio](https://developer.android.com/studio) to install.
|
||||
|
||||
2. Install golang ( 1.15 ).
|
||||
2. Install golang ( 1.16 ).
|
||||
```shell
|
||||
# debian sid
|
||||
apt install -y golang
|
||||
apt install -y golang-1.16
|
||||
```
|
||||
|
||||
3. Install Rust and its stdlib for Android ABIs, and add environment variables for it.
|
||||
|
|
|
@ -3,10 +3,6 @@
|
|||
source $HOME/.bashrc
|
||||
source "bin/init/env.sh"
|
||||
|
||||
# Import golang
|
||||
export PATH=$PATH:$HOME/.go/bin
|
||||
export PATH=$PATH:$(go env GOPATH)/bin
|
||||
|
||||
# Native dependencies
|
||||
bin/init/libs/ffmpeg.sh
|
||||
bin/init/libs/boringssl.sh
|
||||
|
|
|
@ -1,33 +1,26 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
source "bin/init/env.sh"
|
||||
|
||||
## Install rust
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y
|
||||
source $HOME/.cargo/env
|
||||
rustup install $(cat ss-rust/src/main/rust/shadowsocks-rust/rust-toolchain)
|
||||
rustup target install armv7-linux-androideabi aarch64-linux-android i686-linux-android x86_64-linux-android
|
||||
|
||||
echo "rust.rustcCommand=$HOME/.cargo/bin/rustc" >> local.properties
|
||||
echo "rust.cargoCommand=$HOME/.cargo/bin/cargo" >> local.properties
|
||||
echo "rust.pythonCommand=/usr/bin/python3" >> local.properties
|
||||
echo "rust.rustcCommand=$HOME/.cargo/bin/rustc" >>local.properties
|
||||
echo "rust.cargoCommand=$HOME/.cargo/bin/cargo" >>local.properties
|
||||
echo "rust.pythonCommand=/usr/bin/python3" >>local.properties
|
||||
|
||||
# Install Golang
|
||||
curl -o golang.tar.gz https://storage.googleapis.com/golang/go1.15.8.linux-amd64.tar.gz
|
||||
mkdir -p "$HOME/.go"
|
||||
tar -C "$HOME/.go" --strip-components=1 -xzf golang.tar.gz
|
||||
curl -o golang.tar.gz https://storage.googleapis.com/golang/go1.16.linux-amd64.tar.gz
|
||||
tar -C "/usr/local/lib/go-1.16" --strip-components=1 -xzf golang.tar.gz
|
||||
rm golang.tar.gz
|
||||
export PATH=$PATH:$HOME/.go/bin
|
||||
export PATH="$PATH:/usr/local/lib/go-1.16/bin"
|
||||
go version
|
||||
|
||||
# Find Android NDK
|
||||
_NDK="$ANDROID_HOME/ndk/21.3.6528147"
|
||||
[ -f "$_NDK/source.properties" ] || _NDK="$ANDROID_NDK_HOME"
|
||||
[ -f "$_NDK/source.properties" ] || _NDK="$ANDROID_HOME/ndk-bundle"
|
||||
[ -f "$_NDK/source.properties" ] || echo "Error: NDK Not found"
|
||||
ANDROID_NDK_HOME=$_NDK
|
||||
|
||||
echo "NDK Found: $_NDK"
|
||||
echo "sdk.dir=$ANDROID_HOME" >> local.properties
|
||||
echo "ndk.dir=$ANDROID_NDK_HOME" >> local.properties
|
||||
echo "sdk.dir=$ANDROID_HOME" >>local.properties
|
||||
echo "ndk.dir=$ANDROID_NDK_HOME" >>local.properties
|
||||
|
||||
bin/libs/v2ray/init.sh
|
||||
|
||||
|
|
|
@ -6,12 +6,28 @@ if [ -z "$ANDROID_HOME" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ -f "$ANDROID_HOME/ndk-bundle/source.properties" ]; then
|
||||
export NDK=$ANDROID_HOME/ndk-bundle
|
||||
else
|
||||
export NDK=$ANDROID_HOME/ndk/21.3.6528147
|
||||
_NDK="$ANDROID_HOME/ndk/21.3.6528147"
|
||||
[ -f "$_NDK/source.properties" ] || _NDK="$ANDROID_NDK_HOME"
|
||||
[ -f "$_NDK/source.properties" ] || _NDK="$NDK"
|
||||
[ -f "$_NDK/source.properties" ] || _NDK="$ANDROID_HOME/ndk-bundle"
|
||||
|
||||
if [ ! -f "$_NDK/source.properties" ]; then
|
||||
echo "Error: NDK not found."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export ANDROID_NDK_HOME=$NDK
|
||||
|
||||
export ANDROID_NDK_HOME=$_NDK
|
||||
export NDK=$_NDK
|
||||
export PROJECT=$(realpath .)
|
||||
|
||||
if [ ! $(command -v go) ]; then
|
||||
if [ -d /usr/lib/go-1.16 ]; then
|
||||
export PATH=$PATH:/usr/lib/go-1.16/bin
|
||||
elif [ -d /usr/local/lib/go-1.16 ]; then
|
||||
export PATH=$PATH:/usr/local/lib/go-1.16/bin
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $(command -v go) ]; then
|
||||
export PATH=$PATH:$(go env GOPATH)/bin
|
||||
fi
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
source "bin/init/env.sh"
|
||||
export GO111MOUDLE=on
|
||||
export PATH="$PATH:$(go env GOPATH)/bin"
|
||||
export GO386=softfloat
|
||||
|
||||
cd "$PROJECT/v2ray"
|
||||
gomobile init
|
||||
|
|
2
v2ray
2
v2ray
|
@ -1 +1 @@
|
|||
Subproject commit 51c769d4581866192e146b90dda6652c1f922f82
|
||||
Subproject commit c936583bb4e0d776467d8c80d4d80b7516c9262e
|
Loading…
Reference in New Issue