What happened to the code below? I use AsyncSocket to connect to SOCKS proxies and set proxy settings in the onSocketWillConnect delegation onSocketWillConnect . If I omit calls to CFReadStreamSetProperty and CFWriteStreamSetProperty , the socket connection will run smoothly. Otherwise, I get [Do not save type] on the freed instance without tracked stack trace (maybe this is due to CFNetwork?). Does anyone know what gives?
CFDictionaryRef proxyDict = CFNetworkCopySystemProxySettings(); CFMutableDictionaryRef socksConfig = CFDictionaryCreateMutableCopy(NULL, 0, proxyDict); CFDictionarySetValue(socksConfig, kCFStreamPropertySOCKSProxyHost, CFSTR("192.168.1.148")); CFDictionarySetValue(socksConfig, kCFStreamPropertySOCKSProxyPort, (__bridge CFNumberRef)[NSNumber numberWithInt:3129]); CFDictionarySetValue(socksConfig, kCFStreamPropertySOCKSVersion, kCFStreamSocketSOCKSVersion4);
Lan
source share