guardianproject / AndroidPluggableTransports

Android Pluggable Transports (aka PLUTO2)
https://www.pluggabletransports.info/
Other
28 stars 15 forks source link

Cross-compile / make android library from Shapeshifter-Transports #1

Open n8fr8 opened 6 years ago

n8fr8 commented 6 years ago

We need this running on Android: https://github.com/OperatorFoundation/shapeshifter-transports

n8fr8 commented 6 years ago

https://godoc.org/golang.org/x/mobile/app

n8fr8 commented 6 years ago

@Jiangyi excellent, thanks for 262fa49bb6b272feeb411d53b9618948cef4fc95

Now, we need a class to manage the runtime and call the appropriate command line args!

Jiangyi commented 6 years ago

Convenience build script for shapeshifter-dispatcher here: https://gist.github.com/Jiangyi/7a315627e09aac06c3b46ba229071689

For now, put this script in your GOPATH and run it there please!

n8fr8 commented 6 years ago

Some more build options here

GOOS=android GOARCH=arm CC=/home/n8fr8/android/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc CXX=/home/n8fr8/android/ndk/toolchains/ arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ CGO_ENABLED=1 CGO_LDFLAGS="-L/home/n8fr8/android/ndk/platforms/android-14/arch-arm/usr/lib/ -pthread --sysroot /home/n8fr8/android/ndk/platforms/android-14/arch-arm" CGO_CFLAGS="-I/home/n8fr8/android/ndk/platforms/android-14/arch-arm/usr/include/ --sysroot /home/n8fr8/android/nd k/platforms/android-14/arch-arm" GOARM=7 go build -p=8 -pkgdir=$GOMOBILE/pkg_android_arm -tags="" -ldflags="-extldflags=-pie" -a -o ss-local-client -x cmd/shadowsocks-local/local .go

eighthave commented 6 years ago

based on our conversation, this should start with getting daemon running on Android as fast as possible. Then explore how to make them nicely integrated

eighthave commented 6 years ago

@consuelita

n8fr8 commented 6 years ago

@eighthave is making solid progress here this week: https://gitlab.com/eighthave/obfs4 has Mike's iObfs4 building for Android via gomobile bind and a CI build here: https://gitlab.com/eighthave/obfs4/commit/fa72d27971ab009c68f1d43a261cbf20ec03ba84