Did it using the settings API. Here's an example of getting a PAC URL string from OSX network settings.
static char url[257] = {0}; NSDictionary * proxies = (NSDictionary *)SCDynamicStoreCopyProxies(NULL); NSString * pacURL = [proxies objectForKey:(NSString *)kSCPropNetProxiesProxyAutoConfigURLString]; if (NULL != pacURL) { strncpy((char*) (&(url)[0]), [pacURL cStringUsingEncoding:NSASCIIStringEncoding], sizeof(url)); } return url;
source share