Skip to content

Instantly share code, notes, and snippets.

@carlashley
Last active November 14, 2016 10:52
Show Gist options
  • Save carlashley/97e3a6e2dac02877e9e4d7159f4ca43f to your computer and use it in GitHub Desktop.
Save carlashley/97e3a6e2dac02877e9e4d7159f4ca43f to your computer and use it in GitHub Desktop.
Global proxies
#!/usr/bin/python
# A dictionary of detailed proxy information as seen in the Network system preference pane.
from SystemConfiguration import (
SCDynamicStoreCreate,
SCDynamicStoreCopyValue,
)
ds = SCDynamicStoreCreate(None, 'global_proxies', None, None)
result = SCDynamicStoreCopyValue(ds, 'State:/Network/Global/Proxies')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment