This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
mitmproxy possible? (Pythonista 1.6 beta)
Is there any reason why mitmproxy can't work with pythonista?
I was able to download/"install" it using githubget.py (got the github dowloader somewhere in the forums)...it creates the mitmproxy-master folder in the root directory of pythonista. Should the whole folder be moved into site-packages?
Also if anybody has an alternative recommendation for intercepting an ssl-encrypted value in python, I'd love to know about it.
omz last edited by
I don't think it's possible to get this to work in Pythonista at all. From looking at the source code briefly, it seems to require running
pfctlwith root privileges, which just isn't possible on iOS.
pacco last edited by
What an incredible coincidence! I was just playing with various Python-based http proxies the day before (which also relates to a recent question on this forum about running server apps in the background). I've found several several http (tcp/80) proxies that work ok with Pythonista:
But haven't been able to get any SSL-based ones working either. The one I'm currently looking at is <a href="http://code.google.com/p/proxpy/">proxpy</a> but I suspect it has a dependency on OpenSSL (either the lib or a binary) which clearly is not available in Pythonista. If you make any progress with mitmproxy (or any other) please update this thread -- I'm very interested in this as well.
Sidenote: One interesting discovery made while playing with the proxy servers -- iOS (8.3 anyway) uses this URL
http://mesu.apple.com/assets/com_apple_MobileAsset_SoftwareUpdate/com_apple_MobileAsset_SoftwareUpdate.xmlto check if any new OS updates are available. It's also interesting/depressing to see just how many apps on your device call home using various analytic frameworks...
Edit: Fixed bad markdown for URLs.
Well I'm glad I didn't spend any significant amount of time trying to get it to work then. Thanks OMZ! I'm also curious whether that's an iOS limitation or a python from within iOS limitation?
Paco- just saw your post. Thanks for your input, might have a go with your suggestions if it turns out ssl can be used, and I'll be sure to report back if I find any solutions.
ccc last edited by
OpenSSL is in Pythonista...
import ssl print(ssl.OPENSSL_VERSION) # OpenSSL 1.0.1g 7 Apr 2014 in the current Beta
pacco last edited by
@ccc -- you're right, of course. I was thinking of the OpenSSL wrapper module that some of these proxy servers depend on. (I believe it wraps the external openssl binary, which isn't an option for Pythonista for the obvious reasons)<br>
@Tizzy -- I still haven't gotten proxpy working, but I realized I'd forgotten to install the local proxpy root CA on the iOS device I was testing with. (It installs under Settings app->Profiles, like any other mobileconfig). Will continue messing with it as time allows...
@pacco Checking in, any word on proxies in Pythonista since we brought this up quite a while ago? Any Luck?