Sunday, September 7, 2014

Meet my new friend: Charles

Last week, while coding/debugging some https code on iPhone, I was looking for a tool to simply display the request/response and http headers running on mac.

I met Charles. Charles is an HTTP proxy that let you view all of the HTTP and SSL / HTTPS traffic between their machine (or phone) and the Internet. Here is a sample doc on how to configure it to view requests sent from your device.

http proxy set up

To set up Charles as a proxy for spying http traffic on your iPhone

  • Go to Settings -> Wifi, on your wifi name select info
  • Enter your IP + port 8888
  • Open Charles on you mac

Note: Once you finished your work and you closed Charles app, remember to switch off the proxy settings otherwise your internet connection won't work.

SSL setup

To use Charles with SSL, simply:
  • Get a certificate for your phone: open a browser go to
  • Install it, you will be prompted to enter your passcode
  • On your mac, go to Charles menu: Proxy ->Proxy settings… -> SSL tab and the https address (for ex: or a generic wild character
You're ready to fire, and you can browser your call:

Charles you're a great friend though not an open source dude, you have a license fee. If you're looking on open source side you have Wireshark option, but on mac it means installing X11 separately and a bit more work to configure SSL.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.