Skip to content

Instantly share code, notes, and snippets.

@omz
Created July 26, 2015 13:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omz/9b918c98d3f6bd66c1cc to your computer and use it in GitHub Desktop.
Save omz/9b918c98d3f6bd66c1cc to your computer and use it in GitHub Desktop.
CFNetworkProxySettings.py
# Print system proxy settings using CFNetwork
# NOTE: Requires Pythonista 1.6 (currently in beta)
from objc_util import *
CFNetworkCopySystemProxySettings = c.CFNetworkCopySystemProxySettings
CFNetworkCopySystemProxySettings.restype = c_void_p
CFNetworkCopySystemProxySettings.argtypes = []
proxy_settings = ObjCInstance(CFNetworkCopySystemProxySettings())
print proxy_settings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment