[guardian-dev] Tor on Android over Open Garden

Hans-Christoph Steiner hans at guardianproject.info
Tue Jun 18 14:24:52 EDT 2013



On 06/17/2013 10:36 PM, Nathan of Guardian wrote:
> On 06/17/2013 10:10 PM, Greg Hazel wrote:
>> What do you disable, exactly, to preserve battery? Network calls
>> should quickly fail with a host unreachable error - perhaps you could
>> use that as a cue to stop activity, and not try again until the user
>> generates some sort of traffic? Failing fast based on DisableNetwork
>> is no better than failing fast based on host unreachable..
> Host unreachable is something happening deep down within Tor, and it is
> more complicated than a traditional client-to-server connection. Tor
> will continue to try and connect and reconnect as networks go away and
> come back (say switching between 3G and wifi). Tor can have many (more
> than 10 easily) connections open to different Tor entrance nodes, and
> those come and go and change often.
> 
> What we do then is put Tor into "airplane mode" when we think that it
> should stop trying to reconnect and build circuits, based on what
> Android is tell us the state of our internet connection is.
> 
> Don't get me wrong - we really want to support Open Garden, but I also
> believe our current implementation makes the most sense for most of our
> users.
> 
>>
>> According to Android bug 33666, this occurs for ethernet connections
>> as well. Nothing to do with adhoc mesh networking, it's just
>> ConnectivityManager bugs.
> Okay, we will check into this, and work around the bug.

This sounds like the situation we had with Serval and MeshTether.  When
configuring networking on Android outside of the standard Java API, which is
something I guess that OpenGarden might need to do, Android itself remains
ignorant of those outside network configurations.  In Serval's case, the app
actually tells Android to disable wifi, then configures things itself using
low level Linux calls (e.g. iwconfig).  Android then still considers the wifi
to be off, and reports it as such.

In MeshTether, we worked around it by configing as much as possible via the
Java Android API, then changing only what we had to via the low level Linux
commands.  This means that Android retains a pretty good sense of the status
of the network, even tho its ignorant of the mesh stuff.

.hc


> 
> 
>>
>> As long as a WiFi or 3G/4G connection is present, OrbotVPN should work
>> fine -- however if OrbotVPN is pushing traffic through Open Garden,
>> the same ConnectivityManager issue applies.
>>
> Understood. We also work with OLSR-based mesh networks, and are seeing
> this same issue there, when we establish an adhoc wifi connection at a
> lower level than Connection Manager.
> 
> Thanks for joining out -dev list and look forward to working this out.
> 
> +n
> 
> 
> 
> 
> _______________________________________________
> Guardian-dev mailing list
> 
> Post: Guardian-dev at lists.mayfirst.org
> List info: https://lists.mayfirst.org/mailman/listinfo/guardian-dev
> 
> To Unsubscribe
>         Send email to:  Guardian-dev-unsubscribe at lists.mayfirst.org
>         Or visit: https://lists.mayfirst.org/mailman/options/guardian-dev/hans%40guardianproject.info
> 
> You are subscribed as: hans at guardianproject.info
> 


More information about the Guardian-dev mailing list