Update v2ray-core

This commit is contained in:
世界 2021-03-05 23:09:24 +08:00
parent e01fe0d361
commit a6c0bca680
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
8 changed files with 39 additions and 34 deletions

View File

@ -152,7 +152,7 @@ jobs:
uses: actions/setup-go@v2 uses: actions/setup-go@v2
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
with: with:
go-version: 1.15 go-version: 1.16
- name: Native Build - name: Native Build
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
run: ./run libs v2ray run: ./run libs v2ray

View File

@ -167,7 +167,7 @@ jobs:
uses: actions/setup-go@v2 uses: actions/setup-go@v2
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
with: with:
go-version: 1.15 go-version: 1.16
- name: Native Build - name: Native Build
if: steps.cache.outputs.cache-hit != 'true' if: steps.cache.outputs.cache-hit != 'true'
run: ./run libs v2ray run: ./run libs v2ray

View File

@ -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. It is recommended to use [AndroidStudio](https://developer.android.com/studio) to install.
2. Install golang ( 1.15 ). 2. Install golang ( 1.16 ).
```shell ```shell
# debian sid # 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. Install Rust and its stdlib for Android ABIs, and add environment variables for it.

View File

@ -3,10 +3,6 @@
source $HOME/.bashrc source $HOME/.bashrc
source "bin/init/env.sh" source "bin/init/env.sh"
# Import golang
export PATH=$PATH:$HOME/.go/bin
export PATH=$PATH:$(go env GOPATH)/bin
# Native dependencies # Native dependencies
bin/init/libs/ffmpeg.sh bin/init/libs/ffmpeg.sh
bin/init/libs/boringssl.sh bin/init/libs/boringssl.sh

View File

@ -1,33 +1,26 @@
#!/usr/bin/env bash #!/usr/bin/env bash
source "bin/init/env.sh"
## Install rust ## Install rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain none -y
source $HOME/.cargo/env source $HOME/.cargo/env
rustup install $(cat ss-rust/src/main/rust/shadowsocks-rust/rust-toolchain) 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 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.rustcCommand=$HOME/.cargo/bin/rustc" >>local.properties
echo "rust.cargoCommand=$HOME/.cargo/bin/cargo" >> local.properties echo "rust.cargoCommand=$HOME/.cargo/bin/cargo" >>local.properties
echo "rust.pythonCommand=/usr/bin/python3" >> local.properties echo "rust.pythonCommand=/usr/bin/python3" >>local.properties
# Install Golang # Install Golang
curl -o golang.tar.gz https://storage.googleapis.com/golang/go1.15.8.linux-amd64.tar.gz curl -o golang.tar.gz https://storage.googleapis.com/golang/go1.16.linux-amd64.tar.gz
mkdir -p "$HOME/.go" tar -C "/usr/local/lib/go-1.16" --strip-components=1 -xzf golang.tar.gz
tar -C "$HOME/.go" --strip-components=1 -xzf golang.tar.gz
rm 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 go version
# Find Android NDK echo "sdk.dir=$ANDROID_HOME" >>local.properties
_NDK="$ANDROID_HOME/ndk/21.3.6528147" echo "ndk.dir=$ANDROID_NDK_HOME" >>local.properties
[ -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
bin/libs/v2ray/init.sh bin/libs/v2ray/init.sh
@ -48,4 +41,4 @@ popd
rm -r ssr-libev/src/main/jni/pcre/dist/testdata rm -r ssr-libev/src/main/jni/pcre/dist/testdata
rm -r ssr-libev/src/main/jni/mbedtls/programs/fuzz/corpuses rm -r ssr-libev/src/main/jni/mbedtls/programs/fuzz/corpuses
rm -r ssr-libev/src/main/jni/mbedtls/tests/data_files rm -r ssr-libev/src/main/jni/mbedtls/tests/data_files

View File

@ -6,12 +6,28 @@ if [ -z "$ANDROID_HOME" ]; then
fi fi
fi fi
if [ -f "$ANDROID_HOME/ndk-bundle/source.properties" ]; then _NDK="$ANDROID_HOME/ndk/21.3.6528147"
export NDK=$ANDROID_HOME/ndk-bundle [ -f "$_NDK/source.properties" ] || _NDK="$ANDROID_NDK_HOME"
else [ -f "$_NDK/source.properties" ] || _NDK="$NDK"
export NDK=$ANDROID_HOME/ndk/21.3.6528147 [ -f "$_NDK/source.properties" ] || _NDK="$ANDROID_HOME/ndk-bundle"
if [ ! -f "$_NDK/source.properties" ]; then
echo "Error: NDK not found."
exit 1
fi fi
export ANDROID_NDK_HOME=$NDK export ANDROID_NDK_HOME=$_NDK
export NDK=$_NDK
export PROJECT=$(realpath .)
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

View File

@ -2,7 +2,7 @@
source "bin/init/env.sh" source "bin/init/env.sh"
export GO111MOUDLE=on export GO111MOUDLE=on
export PATH="$PATH:$(go env GOPATH)/bin" export GO386=softfloat
cd "$PROJECT/v2ray" cd "$PROJECT/v2ray"
gomobile init gomobile init

2
v2ray

@ -1 +1 @@
Subproject commit 51c769d4581866192e146b90dda6652c1f922f82 Subproject commit c936583bb4e0d776467d8c80d4d80b7516c9262e