cocoa - Programmatically Retrieve OSX Network/Proxies configuration values -
considering application has user id , password admin user logged in, possible retrieve configuration values osx network settings? particularly interested in "advanced/proxies" tab content.
did settings api. here's example fetch pac url string 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;
Comments
Post a Comment