Open bsenyk opened 8 years ago
Hi @eighthave is checking that either
SOCKS 4A/5 proxy 127.0.0.1:9050
HTTP proxy 127.0.0.1:8118
are accessible a reliable way to establish if Tor is running and ask the user to turn it on if not before having our app connect to download content updates?
If those ports are present and open, that's an reliable way to detect it on many devices, but not all. We have an Intent/Receiver based interface where Orbot broadcasts out its state, and apps can ask Orbot to start, provided the user has not disabled autostart.
See OrbotHelper
in NetCipher. It provides lots of helper methods for this stuff, including detecting whether Orbot is installed, and prompting the user to install it:
Just add this to gradle to use it:
compile 'info.guardianproject.netcipher:netcipher:1.2'
hi @eighthave, thanks for your help!
Do you know if anybody has been working on integrating netcipher into a cordova project?
If not, perhaps we can use the info in the file you linked to above to use something like https://github.com/lampaa/com.lampa.startapp to fire the intent.
I know next to nothing about Cordoba, but would be happy to help you get it working there. I can say that sending an Intent is absolutely basic, fundamental Android, so cordoba must have a way to do it. I think @n8fr8 has done some phonegap, maybe he can help.
I think it is mostly WebView proxying that needs to be done, though there may be some Javascript bridge support into network calls in the Java layer.
If it is not running, prompt the user to start it.