0

We are developing iOS apps with charles, but recently company used automatic proxy configuration like this

http://ourproxy.com:8181

Everyone need set up this from connection configuration. That way will make Charles failed to read http connections.

So how to set up Charles proxy to make it work to monitor simulator apps running ?

Forrest
  • 122,703
  • 20
  • 73
  • 107

1 Answers1

1

Maybe you need a copy of your company's pac file, just add a condition of your simulator app requested domain. For example, create new pac file:

function FindProxyForURL(url, host) {
    if (isPlainHostName(host)
    || dnsDomainIs(host, "simulator_requested_domain.com")
    || false) {
        return "PROXY 127.0.0.1:8888";   // proxy to Charles port.
    } else {
        // you may need to copy your company's conditions
        return "PROXY your_company_proxy.com:8181";
    }
}

And then, upload this file to your local or remote http server, and set network's automatic proxy configuration to the url of this pac file.

Because of macosx's sandbox policy, browsers or other APPs cannot access local pac files, so you need to put pac to a "http://" based path.

Ethan
  • 371
  • 3
  • 4
  • thanks for your answers. but the problem is we can not ask the company to change such things because it is huge company and they do not want risking of our humble request changes. so just wonder any other solutions without requesting their changes. thanks again. – Forrest Sep 11 '14 at 05:19
  • alt, do not need your change anything, just set your local network config to charles pac proxy, and then set proxy setting in Charles.app "Toolbar->Settings->External Proxy Setting->Use external proxy servers", input your company's proxy server/port here. – Ethan Sep 15 '14 at 09:40