gofly / go-tun2socks-build

tun2socks with v2ray & xray support for Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 under version 1.16)
  • install gomobile and init with gomobile init -v
  • install JDK 8 (not jre)
  • Download Android SDK and NDK (test under SDK 30 and NDK r21e)

Build

export GOPROXY=https://goproxy.cn
# go
export GOPATH="/home/xxx/go"
export PATH=$PATH:/usr/local/go/bin:~/go/bin
# android
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

# Build a Framework (not test)
make ios

# Both
make

About

tun2socks with v2ray & xray support for Android

License:GNU General Public License v3.0


Languages

Language:Go 99.3%Language:Makefile 0.7%