David Fifield:
There are trivial forks of obfs4[1] and goptlib[2] that simply hard-code some options that are normally sent as environment variables because obfs4proxy runs in managed mode[3].
[…] This is radical. Maybe you don't need the fork of goptlib if you do os.Setenv on the relevant variables before calling pt.ClientSetup in obfs4?
Awesome. Thanks for the tip: nuked the goptlib fork *and* cleaned up the obfs4 fork a bunch: https://github.com/mtigas/obfs4/compare/1df5c8ffe8f4aa2614323698e8008f1ab1fb...
As for the rest of iObfs, the build is a little more streamlined now, using a fork of gomobile (since mainline doesn't build for i386 by default) and the now-smaller obfs fork: https://github.com/mtigas/iObfs/blob/master/build.sh
And things are in fairly clean shape now. There's an example in my repo now[1] showing minimally what it takes to link and implement Tor into a webview app[2] and then how to link & implement obfs4proxy into it[3].
[1]: https://github.com/mtigas/iObfs/tree/master/example [2]: https://github.com/mtigas/iObfs/commit/838fe6d926d643809cc8ea7e8a9b34a14c247... [3]: https://github.com/mtigas/iObfs/commit/00fac92d620a6401de7b699720f3caa79b7a3...