Setting up Charles Proxy and make it work behind VPN

Charles Proxy is one of the most used tools in mobile developers kit.

Here is a brief on the steps required to make it work in an enterprise VPN setup.

I am using Charles proxy version 4.1.2 on mac.

  1. Download it from here and install it. Grant necessary permission.Screen Shot 2017-05-23 at 11.57.54 AM.png
  2. Make sure in your network settings, auto proxy is not turned on.Screen Shot 2017-05-23 at 11.17.16 AM.png
  3. One point to keep in mind is that any network settings related changes should be done before running Charles. Also, make sure to run the iOS simulator only after running the Charles.
  4. Run Charles and install the root certs for iOS simulators.Screen Shot 2017-05-23 at 11.31.41 AM.png
  5. Upon success, you should be seeing this:Screen Shot 2017-05-23 at 11.43.01 AM
  6. Now, you can see all the traffic originating from your mac machine. There are two ways to segregate the data in the UI. They are Structure and Sequence. In the sequence mode, you can apply filter and see only traffic data you are interested in.
  7. Structure Views.png
  8. Sequence View with filter appliedse.png
  9. On a side note, it is a good idea to keep the request and response separate in UI.Screen Shot 2017-05-23 at 11.58.17 AM.png
  10. Run your Xcode project and identify the traffic to the domain you are interested in. At first, you would see the encrypted content like below. I just opened apple.com in iOS simulator’s Safari app.Screen Shot 2017-05-23 at 12.05.20 PM.png
  11. In the above example, we are interested in http://www.apple.com. In order to see the content in plain text we need to enable ‘SSL Proxying’ for this domain. There are multiple ways to do this. The easiest is to right click the domain in the Structure View and select the option ‘SSL Proxying’ from menuUntitled.png
  12. You should see a blue globe like icon next to all domains, whose content is decrypted or readable by Charles.

 Screen Shot 2017-05-23 at 11.50.19 AM.png

13. Once, done you can see all the traffic in plain textScreen Shot 2017-05-23 at 12.24.17 PM.png

You can also set breakpoints against a specific domain and edit the requests/responses based on your needs.There are no extra steps to be done if you are developing behind VPN, based on my experience.

Advertisements
Setting up Charles Proxy and make it work behind VPN

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s