nw_connection_t anyway to set proxy

Hi I am wondering if there is any way I can configure the proxy on nw_connection without using the system's global proxy.

Looks like NSUrl can do but not nw_connection no?

Network framework has very few proxy controls. Right now all you have is nw_parameters_set_prefer_no_proxy. It sounds like that won’t work for you, and that you want the connection to use a custom proxy. If so, I have two bits of advice for you:

  • File an enhancement request against Network framework describing what you’d like it to do and why. Please post your bug number, just for the record.

  • As a workaround, you can use either an NSURLSessionStreamTask or CFSocketStream.

Share and Enjoy

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

nw_connection_t anyway to set proxy
 
 
Q