+ (void)networkProxySettings {
CFDictionaryRef proxySettings = CFNetworkCopySystemProxySettings();
NSDictionary *dictProxy = (__bridge_transfer NSDictionary *)proxySettings;
if ([dictProxy[@"HTTPEnable"] boolValue]) {
NSString *address = dictProxy[@"HTTPProxy"];
NSString *port = dictProxy[@"HTTPPort"];
NSLog(@"%@ %@", address, port);
}
}
Last active
August 18, 2017 03:46
-
-
Save layneios/4f3ff84138328349c57d9b3060561b12 to your computer and use it in GitHub Desktop.
OC 获取网络代理设置
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment