Okay, so today I’m gonna share my experience messing around with Charles Proxy, or as I like to call it, “Charles Cook” because, well, I always mess up the name. Anyway, buckle up, it was a bit of a ride!

Who is Charles Cook? All about his life and career!

First things first: I downloaded Charles. Sounds simple, right? Nope. I went to their website, clicked the download button, and then spent a good five minutes trying to figure out which version was the right one for my ancient Mac. Eventually, I just guessed and hoped for the best. Luckily, it worked!

Next, I installed it. Pretty straightforward, dragged the little icon into the Applications folder. But then Charles popped up with a bunch of scary-looking warnings about system proxies and SSL certificates. My heart skipped a beat. I swear, security warnings always make me feel like I’m about to break my computer.

Configuring the proxy: This is where things got tricky. I wanted to sniff the traffic from my iPhone. I dug into the Charles settings, found the proxy settings, and noted down the IP address and port. Then, on my iPhone, I went into the Wi-Fi settings, found my network, and configured the HTTP Proxy to manual, using the IP and port from Charles. Easy peasy, right? WRONG!

I opened Safari on my iPhone and tried to load a website. Nothing. Just a spinning wheel of doom. I checked the Charles window on my Mac… nothing there either. It was like my iPhone was completely ignoring the proxy settings. I scratched my head, googled furiously, and after about an hour, I realized I needed to enable “Proxy > Proxy Settings > Enable Transparent HTTP Proxying” in Charles. Doh!

SSL Proxying: Now I could see HTTP traffic in Charles! Awesome! But almost everything was showing up as “unknown.” Turns out, that’s because most websites use HTTPS, and Charles needs to be able to decrypt that traffic. That meant installing an SSL certificate on my iPhone.

Who is Charles Cook? All about his life and career!
  • First, I went to */ssl on my iPhone’s Safari browser.
  • This downloaded a profile.
  • I went into Settings > General > Profiles and installed the Charles Proxy CA certificate.
  • Then, I had to go into Settings > General > About > Certificate Trust Settings and enable full trust for the Charles Proxy certificate.

More scary warnings! But I bravely clicked “Trust” on everything. Finally, I could see HTTPS traffic in Charles. Woohoo!

Aha moment: I was trying to debug an API call from an app I was working on. I used Charles to inspect the request and response. I found a typo in the request body that was causing the API to return an error. I fixed the typo in my app, and BAM! It worked. I felt like a genius.

Things I learned:

  • Charles is powerful, but it has a steep learning curve.
  • Read the documentation! Seriously, it helps.
  • Don’t be afraid of the scary warnings, but understand what you’re trusting.
  • Charles can be a lifesaver when debugging API calls.

Overall, messing with “Charles Cook” was a bit of a pain, but definitely worth it. I feel like I leveled up my debugging skills. Now, if you’ll excuse me, I’m going to go reward myself with a cookie. And maybe try to remember how to spell “Charles” correctly.

LEAVE A REPLY

Please enter your comment!
Please enter your name here