Build the tun2socks Android library (AAR)
mainTo build the tun2socks Android library, you must use exactly Go version 1.22 due to dependencies in the psiphon library. The build process requires gomobile to generate an .aar file for Android integration.
Follow these steps:
- Initialize
gomobile. - Bind the package to create the
.aarfile targeting Android API level 21.
go run golang.org/x/mobile/cmd/gomobile init
go run golang.org/x/mobile/cmd/gomobile bind -ldflags="-w -s" -target=android -androidapi=21 -o=tun2socks.aar .