A userspace TCP/UDP firewall and DNS client for Android.
Firestack is not yet stable and the APIs are still in flux.
Firestack is built specifically for RethinkDNS. go-tun2socks provides a golang SOCKS-like interface over the tun-device. It does so by wrapping badvpn's tun2socks in cgo, which in turn relies on LwIP, a light-weight, single-threaded userspace TCP/IP stack underneath the covers.
Firestack is a hard-fork of Google's outline-go-tun2socks project.
Firestack is released as an Android Library (aar
) and can be integrated into
your Android builds via jitpack.io (ref).
# add this to your project's build.gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
# add the dep to your app's build.gradle
dependencies {
implementation 'com.github.celzero:firestack:Tag'
}
The APIs aren't stable and hence left undocumented, but you can look at RethinkDNS (GoVpnAdapter, BraveVpnService) to see how to integrate with Firestack on Android.
Firestack APIs are available only on Android builds for now. iOS and Linux support will come by fall 2021.
- macOS host and Xcode (iOS, macOS)
- make
- Go >= 1.14
- A C compiler (e.g.: clang, gcc)
- gomobile (iOS, macOS, Android)
- xgo (Windows, Linux)
- Docker (Windows, Linux)
- Other common utilities (e.g.: git)
As of Go 1.14, gomobile
does not support building frameworks for macOS. Jigsaw
engineers have patched gomobile to enable building a framework for macOS by
replacing the default iOS simulator build. Until the change is upstreamed,
the (Darwin) binary to enable this behavior is located at tools/gomobile
and
is used by the build_macos.sh
build script.
Not maintained right now but you can build binaries for Linux and Windows
from source without any custom integrations. xgo
and Docker are required to
support cross-compilation.
go get -d ./...
# the only supported flavour right now
./build_android.sh intra
# other unsupported, unmaintained builds:
./build_[ios|linux|macos|windows].sh