SCDynamicStoreCopyProxies() for a specific Interface (e.g. Wi-Fi vs USB LAN)

SCDynamicStoreCopyProxies() appears to only return proxy setting of the first connected adapter. It looks to be the equivalent of scutil --proxy.

What Swift or Objective-C API would allow me to query the proxy for a given adapter? I am looking for the networksetup -getwebproxy "Wi-Fi" equivalent.

Thanks, Billy

What Swift or Objective-C API would allow me to query the proxy for a given adapter?

Determine the correct proxies to use is a complex issue. If that’s your goal, I generally recommend that you use the high-level API in <CFNetwork/CFProxySupport.h>.

However, if you want work with the low-level info, you can get that from the System Configuration framework dynamic store (SCDynamicStore) and preferences (SCPreferences) APIs.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

SCDynamicStoreCopyProxies() for a specific Interface (e.g. Wi-Fi vs USB LAN)
 
 
Q