The CFProxySupport API enables you to take advantage of global proxy configuration settings in your application.
The CFProxySupport functions return arrays of dictionaries, where each dictionary describes a single proxy. The arrays represent the order in which the proxies should be tried. In general, you should try to download a URL using the first proxy in the array, try the second proxy if the first one fails, and so on.
Every proxy dictionary has an entry for
kCFProxyTypeKey. If the type is anything except
kCFProxyTypeAutoConfigurationURL, the dictionary also has entries for the proxy's host and port (under
kCFProxyPortNumberKey respectively). If the type is
kCFProxyTypeAutoConfigurationURL, it has an entry for
The keys for username and password are optional and are present only if the username or password could be extracted from the information passed in (either from the URL itself or from the proxy dictionary supplied). These APIs do not consult any external credential stores such as the Keychain.