[guardian-dev] help with netcipher

arrase arrase at gmail.com
Sun Jan 22 12:21:26 EST 2017


With the sample apps it works.

I added  .withTorValidation() to my source and now onConnectionException is
raised:

01-22 18:06:45.353  7690  7827 W System.err: java.net.ConnectException:
Failed to connect to /127.0.0.1:8118

I think is a race condition, the sample apps starts orbothelper at
Application start but i can't do that.

I'm working on a backup app and if the user has backup every 24 hours and
is managed by a service you can not be sure about the state of orbot, it
can be off and in that case the service is more fast doing the calls than
the app when starts, and i can not find a place at orbot code where the app
waits for Polipo before broadcast the state


2017-01-22 17:41 GMT+01:00 Mark Murphy <mmurphy at commonsware.com>:

> On Sun, Jan 22, 2017, at 11:21, arrase wrote:
> > How do you deal with the lag between onEnabled callback of OrbotHelper
> > and onConnected callback of okhttp3 and the real available state of
> > 127.0.0.1:8118?
>
> There should be no lag.
>
> > I init orbothelper, when onEnabled is called i init
> > StrongOkHttpClientBuilder then when onConnected is called i run
> > okHttpClient.newCall(request).execute() but orbot is not yet available
> > and
> > i get:
> >
> > System.err: java.net.ConnectException: Failed to connect to
> > /127.0.0.1:8118
> >
> > If i try again it works.
>
> If onEnabled() is called, that means that we received a STATUS_ON
> response from Orbot, which should mean that Orbot is accepting requests.
>
> Can you reproduce the problem with the sample apps (e.g.,
> sample-okhttp3) or the test suite (in netcipher-okhttp3)? If so, what
> version of Android and Orbot are you using?
>
> --
> Mark Murphy (a Commons Guy)
> https://commonsware.com | https://github.com/commonsguy
> https://commonsware.com/blog | https://twitter.com/commonsguy
> _______________________________________________
> List info: https://lists.mayfirst.org/mailman/listinfo/guardian-dev
> To unsubscribe, email:  guardian-dev-unsubscribe at lists.mayfirst.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mayfirst.org/pipermail/guardian-dev/attachments/20170122/059d55a1/attachment.html>


More information about the guardian-dev mailing list