[tor-bugs] #28205 [Obfuscation/Snowflake]: linking against other libwebrtc binaries errors out on missing symbols
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed Nov 21 16:09:34 UTC 2018
#28205: linking against other libwebrtc binaries errors out on missing symbols
-----------------------------------+------------------------------
Reporter: eighthave | Owner: eighthave
Type: defect | Status: needs_review
Priority: Medium | Milestone:
Component: Obfuscation/Snowflake | Version:
Severity: Major | Resolution:
Keywords: android | Actual Points:
Parent ID: | Points:
Reviewer: | Sponsor:
-----------------------------------+------------------------------
Comment (by arlolra):
Replying to [comment:44 eighthave]:
> About the patch, could a more descriptive name be used instead of
`package lib`? I'm not sure the rules of Go namespaces, we will need to
avoid name conflicts since ultimately, we want to bundle as many PTs
together into a single shared library, which then can be dynamically
loaded/started/stopped from tor daemon, Orbot, in Android apps, etc.
See https://golang.org/ref/spec#Import_declarations
In the top level `client/snowflake.go`, it's imported as,
{{{
sf "git.torproject.org/pluggable-transports/snowflake.git/client/lib"
}}}
and used like `sf.SnowflakeCollector`, etc.
Replying to [comment:46 eighthave]:
> Ok, I figured out the `go get` issue, it seems sometimes that `go get`
decides that it needs to have `.git` at the end of the path, and other
times not. So I used symlinks to provide both options. Then I only built
`.../client/lib`, not the whole client. `gomobile bind` gets pretty far
before dying with:
>
> {{{
> /tmp/gomobile-work-032904235/src/gobind/go_libmain.go:1052:17: cannot
use (*proxylib_SocksConnector)(_param_socks_ref) (type
*proxylib_SocksConnector) as type lib.SocksConnector in assignment:
> *proxylib_SocksConnector does not implement lib.SocksConnector
(missing Grant method)
> /tmp/gomobile-work-032904235/src/gobind/go_libmain.go:1061:22: cannot
use (*proxylib_SnowflakeCollector)(_param_snowflakes_ref) (type
*proxylib_SnowflakeCollector) as type lib.SnowflakeCollector in
assignment:
> *proxylib_SnowflakeCollector does not implement
lib.SnowflakeCollector (missing Melted method)
> }}}
> https://gitlab.com/eighthave/snowflake/-/jobs/123509344
These are the same issues as before with unsupported export types. What
needs to be done is a `client/mobile/` that imports from `client/lib/` but
only exposes a few methods that your app would need. (On that note, since
the problematic methods are now in `lib/` you can probably build the top
level `client/` without issue, but that probably doesn't help when you
want to integrate the functionality into your app. It's just for show.)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/28205#comment:48>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list