iOS - direct HTTP connection disregarding system proxy settings. Possible? How?

Hi,


I would like to be able to override system proxy settings on iOS, specifically to turn off the proxy and use direct connection instead. I'm using NSURLSession with custom NSURLSessionConfiguration in which I'm using custom .connectionProxyDictionary. I know which keys should be set in this dictionary in order to customize proxy host or port. But how do I explicitly turn proxy usage off (even though it is defined in system wide settings)?


I tried setting kCFNetworkProxiesHTTPEnable: @0 - this doesn't work.

I also tried putting kCFNetworkProxiesProxyAutoConfigJavaScript: @"function findProxyForURL(u,h) { return 'DIRECT'; }" into this dictionary - this doesn't work either.

First up, I'd label the current behaviour as a bug and I encourage you to file a bug report about it. Please post your bug number, just for the record.

Second, I suspect there might be a workaround here but it will require more research than I'm able to do in the context of DevForums. If you want to continue this in a more formal context, please open a DTS tech support incident and we can pick things up from there.

Share and Enjoy

Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thanks, reported. Relevant bug numbers are: 22046796, 22008612. Also submitted a DTS request.

iOS - direct HTTP connection disregarding system proxy settings. Possible? How?
 
 
Q