orbot
orbot copied to clipboard
Explore the use of leaf instead fo go-tun2socks for both consistency and efficiency
Since go-tun2socks is no longer maintained, and due to the inefficiency of cgo
, the better alternative is leaf, which is also used by orbot-ios. Note leaf can be invoked from Go as a static library: https://github.com/eycorsican/leaf/issues/104
Big fan @eycorsican ! :)
We started with leaf, and had some concerns around resulting total binary size. Any thoughts on what a reasonable arm64 build of leaf, say for Android or iOS should be in terms of size?
@bitmold @tladesignz
I'm also a big fan ~ I'm curious to experiment more with it in the future, and frankly I never experimented with leaf as much as I'd have liked to when we were migrating away from our old buggy C++ tun2socks implementation.
When there's time to revisit leaf, I'll post more here. I appreciate you nudging us on to a more maintained codebase
@n8fr8 It might have been related in part to the issue @eycorsican posted on the iOS app too: https://github.com/guardianproject/orbot-ios/issues/6
@n8fr8 yah, as @bitmold mentioned above, with that feature set the size of a .so
file is 9.4MB for arm64 (debugging symbols stripped).
It can be further reduced to 8.4MB by using leaf/config-json
instead of leaf/config-conf
because the conf format brings in a big dependency regex
which is much bigger compares to a json parser. However the tun-fd
option is missing in the json config as I never mind using this format for client applications.