46

I want to modify the website www.moviestarplanet.com. The site got https secured 2-3 weeks ago and i could not use charles anymore.. I've tried so much,but everytime it comes: unknown.

Could anyone help me? Instead of unknown there should be: Gateway. I already installed the certificate.. Maybe I'm doing something wrong?

enter image description here

WillardSolutions
  • 2,316
  • 4
  • 28
  • 38
NiMe
  • 461
  • 1
  • 4
  • 4

6 Answers6

75

There is no clear information on whether this problem is with iOS or Mac.

Mauricio has explained how to solve this problem on Mac.

Let me take the liberty of how to fix this problem in iOS.

So basically there is a SSL trust issue that's happening on device that's why the request is not succeeding and you are getting the network connection failure

If you load the site on non-safari browsers such as Chrome you'll have a option to add an SSL exception for this particular site and proceed.

To fix the problem for once and all follow the below steps

enter image description here

Starting from iOS 10.3 SSL trust for the certificate has to be turned on manually for the manually installed certificate profiles in iOS so go to Settings > General > About > Certificate Trust Settings. Under Enable full trust for root certificates turn on trust for the certificate

Here is the link to apple documentation

Durai Amuthan.H
  • 31,670
  • 10
  • 160
  • 241
  • 20
    And what if you've already done this and it never fixed the problem? – User Sep 27 '18 at 20:03
  • 1
    Went through these steps and it worked. iOS 13.3, Charles 4.2.8 – AzaFromKaza Jan 15 '20 at 02:36
  • I don't see this certificate listed in **About** – IgorGanapolsky Mar 09 '20 at 19:23
  • 1
    that's interesting. Did the certificate install successfully ? What's the iOS Version ? – Durai Amuthan.H Mar 11 '20 at 09:49
  • 4
    If you don't see the certificate listed in About, you may need to install it by going to `https://chls.pro/ssl` and then Settings->General->Profile and installing it, as per these instructions https://benoitpasquier.com/charles-ssl-proxy-ios/ – Patrick Fay Aug 19 '20 at 20:53
  • I'm running Charles Proxy v4.6.1 on an iPhone 7 Plus running iOS 13.5.1. My issue was that after downloading the cert from `chrs.pro/ssl` the cert was not listed under Settings>General>About>Certificate Trust Settings. thks @PatrickFay +1 – TMin Jan 23 '21 at 06:39
  • I found it in Settings>General>Device Management – Hai Feng Kao Jun 09 '23 at 09:31
14

I case you don't get the prompt for trusting the certificate (which means it stays untrusted ...) when installing it on OSX, you need to trust it manually in the keychain: Open the Keychain, search the Charles certificate, double click it, then choose Always trust for When using this certificate.

TheEye
  • 9,280
  • 2
  • 42
  • 58
12

I've been dealing with exactly the same, in my case it resolved by installing Charles Proxy's CA.

As explained in the documentation, in order to view ssl communications as plain text, instead of your browser seeing the server’s certificate, Charles dynamically generates a certificate for the server and signs it with its own root certificate (the Charles CA Certificate). Charles receives the server’s certificate, while your browser receives Charles’s certificate.

So you need to install Charles as CA to set it as trusted. The way to install it varies between browsers and operating systems.

Here I'm quoting what I guess are the most used cofigs:

Windows / Internet Explorer

In Charles go to the Help menu and choose "SSL Proxying > Install Charles Root Certificate". A window will appear warning you that the CA Root certificate is not trusted. Click the "Install Certificate" button to launch the Certificate Import Wizard. The certificate must be imported into the "Trusted Root Certification Authorities" certificate store, so override the automatic certificate store selection. Complete the wizard and your Charles Root Certificate is now installed. You may need to restart IE before the installation takes affect.

Mozilla Firefox

After installing the Charles Add-on for Mozilla, go to the Tools menu, the Charles submenu, and choose the "Install Charles Root Certificate" option. You will be presented with a certificate import dialog. Tick the option "Trust this CA to identify websites" and complete the import.

Mac OS X

In Charles go to the Help menu and choose "SSL Proxying > Install Charles Root Certificate". Keychain Access will open, and prompt you about the certificate. Click the "Always Trust" button. You will then be prompted for your Administrator password to update the system trust settings. You may need to quit and reopen Safari to see the change.

You can see all the available configurations in Charles ssl documentation.

Remember that after installing the certs it's important to restart your browser. This made the difference in my case.

Hope it helps.

Mauricio Mora
  • 749
  • 6
  • 13
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/15198296) – Robert Feb 13 '17 at 21:12
  • 1
    Thanks for your feedback @Robert – Mauricio Mora Feb 14 '17 at 02:29
  • 2
    The Mac OS X instruction does not work in my case. I got `Charles Proxy CA certificate is not trusted` error after `Install Charles Root Certificate`. I didn't get the prompt about the certificate. – Brian Mar 04 '19 at 14:06
  • Anyone fighting with IE11, take note of the "Trusted Root Certification Authorities" part of these directions. I struggled with this for too long before finding these directions with that note. – Jason Lydon Mar 12 '19 at 14:46
  • @Brian My coworker and I had to drag the Root Certificate from one keychain over to the System one. It works – Stephen J Feb 21 '20 at 22:16
11

High level steps

  1. Go to Charles Proxy on your Mac. Help >> SSL Proxying >> Install Charles Root Certificate on Mobile device
  2. Configure the IP given your WiFi settings - HTTP Proxy Settings
  3. Hit Allow on your Mac
  4. Go to chls.pro/ssl on your iPhone
  5. Download the profile
  6. Find the profile on your iPhone Settings
  7. Install the profile into your iPhone
  8. Trust the cert in your iPhone Settings >> About

Detail steps

The instructions for getting it working for the iOS couldn't be any worse.

So in case you needed to configure CharlesProxy for your iPhone connected to your Mac, then the steps are as followed:

Assuming your Mac's browser IP address is 192.168.1.5 then you should NOT put that IP Address into your iPhone's browser.

Where should you put it? Inside the wifi settings. But where? In the IPV4 ADDRESS settings? AGAIN NO!

You should go SCROLL DOWN and put the IP + port number in HTTP PROXY.

Then the rest of the steps are easy to follow. Just open Safari on your iPhone and open chls.pro/ssl and that should prompt your Mac. Hit Allow.

Then on your iPhone you should get a prompt for downloading a cert. Download it.

Go to Settings app. Find the Profile you downloaded. Click it.

enter image description here

Install it:

enter image description here

Trust it: Go to Settings app >> About. Scroll all the way to the bottom. >> Certificate Trust Settings >> Trust the cert.

enter image description here

enter image description here

IMPORTANT

Once you're done, then you need to set the HTTP proxy back to Automatic. Otherwise your iPhone will think it needs to do manual proxy and things won't work

Also note: VPN should be turned off at all times (during initial setup and usage). Otherwise instead of routing the traffic through Charles it will get routed through your VPN.

I ended up deleting my VPN app just to be safe.

mfaani
  • 33,269
  • 19
  • 164
  • 293
  • If you're doing this on simulator, then you have to understand that 1. the cert needs to get installed for each simulator. 2. The simulator needs to get restarted/rebooted after the certificate is installed – mfaani Dec 12 '22 at 17:00
  • For me, it was the trusting step in the About that made it work, thanks! – Mohamed Salah Apr 25 '23 at 08:37
8

If you don't see the Charles certificate in your list, after downloading it from Safari, you should go to Setting -> General -> Profile -> Install Charles Certificate. And then trust under Settings > General > About > Certificate Trust Settings.

4

After installing the root certificate, ensure the website you want to debug is added to the "Include" list in "Proxy" -> "SSL Proxying Settings"

enter image description here

Israfel
  • 1,652
  • 1
  • 12
  • 6