Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xxf098/go-tun2socks-build
tun2socks with v2ray & xray support for Android
https://github.com/xxf098/go-tun2socks-build
android golang tun2socks v2ray xray
Last synced: 4 days ago
JSON representation
tun2socks with v2ray & xray support for Android
- Host: GitHub
- URL: https://github.com/xxf098/go-tun2socks-build
- Owner: xxf098
- License: gpl-3.0
- Created: 2020-01-02T06:21:40.000Z (almost 5 years ago)
- Default Branch: lite
- Last Pushed: 2023-09-03T13:12:40.000Z (about 1 year ago)
- Last Synced: 2024-10-31T16:57:07.514Z (11 days ago)
- Topics: android, golang, tun2socks, v2ray, xray
- Language: Go
- Homepage:
- Size: 392 KB
- Stars: 189
- Watchers: 12
- Forks: 83
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- stars - xxf098/go-tun2socks-build
README
# go-tun2socks-build
Building and using `go-tun2socks` for V2Ray on Android. This library is used in [shadowsocksr-v2ray-trojan-android](https://github.com/xxf098/shadowsocksr-v2ray-trojan-android) for support V2Ray.
![build](https://github.com/xxf098/go-tun2socks-build/workflows/build/badge.svg?branch=master&event=push)
## Setup
* install [go](https://golang.org/doc/install#download) (test with version 1.21.0)
* install [gomobile](https://godoc.org/golang.org/x/mobile/cmd/gomobile) with`go install golang.org/x/mobile/cmd/gomobile@latest`, then init with `gomobile init -v`
* install [JDK 8](https://openjdk.java.net/install/) (not jre)
* Download Android SDK and [NDK](https://developer.android.com/ndk/downloads) (test with SDK 30 and NDK r21e)## Build
```bash
# 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-r21dgo get -d ./...
# Build an AAR
make android```
## Useage