• Stars
    star
    188
  • Rank 205,563 (Top 5 %)
  • Language
    Go
  • License
    GNU General Publi...
  • Created almost 5 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

tun2socks with v2ray & xray support for Android

go-tun2socks-build

Building and using go-tun2socks for V2Ray on Android. This library is used in shadowsocksr-v2ray-trojan-android for support V2Ray.

build

Setup

  • install go (test with version 1.21.0)
  • install gomobile withgo install golang.org/x/mobile/cmd/gomobile@latest, then init with gomobile init -v
  • install JDK 8 (not jre)
  • Download Android SDK and NDK (test with SDK 30 and NDK r21e)

Build

# china only
export GOPROXY=https://goproxy.cn
# setup go env
export GOPATH="/home/xxx/go"
export PATH=$PATH:/usr/local/go/bin:~/go/bin
# setup android env
export ANDROID_HOME=/path/to/Android/Sdk
export ANDROID_NDK_HOME=/path/to/Android/android-ndk-r21d

go get -d ./...

# Build an AAR
make android

Useage