Debug iPhone traffic using Charles Proxy Socks?

I am trying to use Charles Proxy to debug some performance issues on my iPhone. I got all this using the "HTTP proxy mode", but I can not do it using the "socks proxy" mode. Since iOS exhibits different behavior in the HTTP proxy than in real life (see http://www.charlesproxy.com/documentation/configuration/proxy-settings/ ), I would really like the proxy server to work.

After setting up the socks proxy on my iPhone, I can’t connect to any site, and smelling on the machine Charles is running on shows that I get reset whenever I try to connect. What step will I skip?

It would be very helpful to know how to make it work on Mac or Windows!

+3
source share
1 answer

Configure Socks proxy for iOS with a PAC file

Launch the Apache server on your Mac or somewhere on the network (raw gist will work ). Create a simple PAC file.

proxy.pac

function FindProxyForURL(url, host) {
   return "SOCKS <Address of Charles-The-Proxy>:<SOCKS port>";
}

Then specify iPhones proxy settings under the network connection on HTTP Proxy-> Auto-> http://<addressOfWebServer>/proxy.pac

Final note

Remember to cancel the proxy settings when done.

+3
source

All Articles