Hi there, I know a user in China with an Android device who is having trouble with the GFW. I run private bridges for a couple friends in odd places and recently upgraded to obfs3, but after inquiring on IRC this morning I found that Android doesn't have obfs3 support yet:
17:17 < gamambel> gmorehou: unfortunately, not yet. someone has to either implement obfs3 in C, or make the new python obfsproxy work on Android. i don't think anybody is working on that yet.
Just a quick question (apologies if it's a repeat) from a totally Android-naive developer: is using Jython a possibility to speed the availability of obfs3 on Android? Last I knew, which was in the dark ages, some Python code could be tortured into running on Android devices by compiling it with Jython. Just curious if this has been considered or not. I don't know what Android-specific problems there may be, but I know that in general Jython lags behind the latest stable Python, so e.g. code written against Python 2.7 might need to be tweaked to run against 2.5, etc.
2013/5/16 Gordon Morehouse gordon@morehouse.me:
Just a quick question (apologies if it's a repeat) from a totally Android-naive developer: is using Jython a possibility to speed the availability of obfs3 on Android? Last I knew, which was in the dark ages, some Python code could be tortured into running on Android devices by compiling it with Jython. Just curious if this has been considered or not. I don't know what Android-specific problems there may be, but I know that in general Jython lags behind the latest stable Python, so e.g. code written against Python 2.7 might need to be tweaked to run against 2.5, etc.
Nope, jython compiles to java bytecode, but is not designed to work also on the Davilk VM, and afaik all forks of jython for android are dead.[0] In order to run some python code on Android for APAF, I have used SL4A[1], which is a little tricky, but seems more actively developed and ports a few external libraries which could be useful - i.e. pyCrypto.
[0] https://code.google.com/p/jythonroid/ https://github.com/rjolly/jythonroid/ [1] https://code.google.com/p/android-scripting/
-- ù
On Sat, May 25, 2013, at 08:47 AM, Michele Orrù wrote:
2013/5/16 Gordon Morehouse gordon@morehouse.me:
Just a quick question (apologies if it's a repeat) from a totally Android-naive developer: is using Jython a possibility to speed the availability of obfs3 on Android? [snip]
Nope, jython compiles to java bytecode, but is not designed to work also on the Davilk VM, and afaik all forks of jython for android are dead.[0] In order to run some python code on Android for APAF, I have used SL4A[1], which is a little tricky, but seems more actively developed and ports a few external libraries which could be useful - i.e. pyCrypto.
[0] https://code.google.com/p/jythonroid/ https://github.com/rjolly/jythonroid/ [1] https://code.google.com/p/android-scripting/
In my own continued research, I was taking a look at SL4A as well. It does look fairly active.
I'm gonna dump a couple other links here concerning Python on Android, I haven't assessed the state of these projects yet, but I have a friend in a censored region with only access to an Android device, and obfs2 is working sporadically or not at all for them, hence the research. :)
https://code.google.com/p/python-for-android/wiki/CrossCompilingPython (Python 3 compiling to Android notes)
http://mdqinc.com/blog/2011/09/cross-compiling-python-for-android/ (Python 2.7.2 compiling to Android notes)
On 05/25/2013 08:47 AM, Michele Orrù wrote:
In order to run some python code on Android for APAF, I have used SL4A[1], which is a little tricky, but seems more actively developed and ports a few external libraries which could be useful - i.e. pyCrypto.
Yes, I think this might be the route. The plan would be to create a standalone app/plug-in for Obfs3 support, instead of bundling it into Orbot directly. This would allow us to support whatever complexity is needed for Python, without getting the core app too bogged down.
If anyone out there is interested in working on this, please get in touch with me directly, and/or just start hacking on code in a public repo. :)
+n
Nathan Freitas:
On 05/25/2013 08:47 AM, Michele Orrù wrote:
In order to run some python code on Android for APAF, I have used SL4A[1], which is a little tricky, but seems more actively developed and ports a few external libraries which could be useful - i.e. pyCrypto.
Yes, I think this might be the route. The plan would be to create a standalone app/plug-in for Obfs3 support, instead of bundling it into Orbot directly. This would allow us to support whatever complexity is needed for Python, without getting the core app too bogged down.
If anyone out there is interested in working on this, please get in touch with me directly, and/or just start hacking on code in a public repo. :)
I have experience getting python code working in android using SL4A. It's relatively straightforward, the main problem is the IPC between a python script and android app. There is no real way to do the IPC, you have to roll your own.
~abel
On 05/26/2013 12:48 AM, Abel Luck wrote:
I have experience getting python code working in android using SL4A. It's relatively straightforward, the main problem is the IPC between a python script and android app. There is no real way to do the IPC, you have to roll your own.
There really isn't much IPC needed for obfsproxy fortunately. You just need to start it up and shut it down.
For Orbot's existing obfsproxy2 support, we do this easily via Runtime.exec() commands.
Nathan Freitas:
On 05/26/2013 12:48 AM, Abel Luck wrote:
I have experience getting python code working in android using SL4A. It's relatively straightforward, the main problem is the IPC between a python script and android app. There is no real way to do the IPC, you have to roll your own.
There really isn't much IPC needed for obfsproxy fortunately. You just need to start it up and shut it down.
For Orbot's existing obfsproxy2 support, we do this easily via Runtime.exec() commands.
If that's the case, then running a python obfs3 should be pretty easy! I'll see if I can dig up some links.
~abel