Repository navigation
Unofficial slim AndroidLibXrayLite build: no TUN/WireGuard, libgojni.so 37.3 → 26.8 MB (arm64) #7126
dec0iiyy
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I made an unofficial, smaller build of AndroidLibXrayLite for people who embed
libv2rayin their own Android apps: https://github.com/dec0iiyy/AndroidLibXrayLite-slimI'm the author. It is not affiliated with 2dust or XTLS.
What is removed. The TUN inbound, WireGuard, MASQUE, mKCP and xdrive implementations, metrics/pprof, the gRPC API (commander), loading a config over HTTP and the command line. Together they pull in gVisor, wireguard-go and netlink, which is where most of the size went. A config that asks for a removed feature fails at start with
... is not registered. If you need a VPN service, use an external tun2socks (hev-socks5-tunnel and the like). If you need WireGuard or the built-in TUN, this build is not for you.What is kept. VLESS, VMess, Trojan, Shadowsocks (including 2022), Hysteria2, SOCKS, HTTP and the usual transports (tcp, WebSocket, gRPC, HTTPUpgrade, XHTTP, Hysteria), TLS (uTLS, ECH), REALITY, routing, DNS and stats. The Java API is identical, so it is a drop-in replacement. ABIs: arm64-v8a, armeabi-v7a, x86_64 (no 32-bit x86),
minSdk24.Numbers.
libgojni.soper ABI, upstreamv26.10.10vs26.10.10-slim. "Compressed" is the deflated size of the file inside the AAR, which is roughly what an APK download carries.The AAR files are 64.9 MB vs 33.0 MB, but that is not a like-for-like comparison: the upstream AAR also contains an x86 library (15.0 MB compressed) and
geoip.dat/geosite.dat(7.9 MB compressed), and the slim AAR contains neither. Ship your own geo files if your config uses them.Why you can trust a binary from a stranger. Every release is built by a GitHub Actions workflow, carries a Sigstore build provenance attestation and a
SHA256SUMSfile, and the toolchain (Go, NDK) is pinned. You can check a download with:The patch is data (a list of packages whose implementation is hidden, and a list of what must never be linked again), and the build fails if gVisor or wireguard-go gets linked back. A scheduled workflow checks for new upstream releases every day and builds them;
v26.10.10took about four minutes.Testing. An in-process client/server test sends HTTP through SOCKS5 over VLESS (ws, gRPC, XHTTP, HTTPUpgrade), VMess, Trojan, Shadowsocks, SOCKS, HTTP and Hysteria2. REALITY is only checked by parsing a config. This is not a replacement for testing on a device.
Feedback and bug reports are welcome in the repo's issues.
All reactions