moolz
moolz

Reputation: 29

Safari won't work after entering Charles Proxy server and port details on iPhone?

I'm trying to use Charles Proxy to do testing for some app builds for iOS. However, as soon as I enter the server and port information, the phone I'm using for testing can no longer connect to any web pages.

Here are the steps I'm using:

  1. Connect to the same WiFi on both the PC and iPhone.
  2. Open Charles
  3. Stop Windows Proxying
  4. Help -> SSL Proxying -> Install Charles Root Certificate on a Mobile Device or Remote Browser
  5. Open iPhone Settings, navigate to WiFi
  6. Navigate to "Configure Proxy", select Manual.
  7. Enter IP as "Server" and the port following the IP as "Port"

After doing this, the WiFi no longer works so I'm unable to access "chls.pro/ssl" to download the Charles certificate. Anyone have any idea why this could be happening?

Upvotes: 1

Views: 3831

Answers (4)

So, I encountered this issue and tried using ChatGPT, Gemini, Google, and Stack Overflow. After some searching, I came back to this post, and finally, it worked!

The solution involved a combination of suggestions here:

  1. Delete the certificate and reinstall it. However, I ran into a problem where typing "chls.pro/ssl" or "charlesproxy.com/getssl [invalid URL removed]" in Safari didn't do anything. So, I went to Charles on Windows and navigated to Help > SSL Proxying > Save Charles Root Certificate. Then, I sent the certificate to my phone using a messaging app.

  2. On my iPhone, I went to Settings > General > About > Certificate Trust Settings and enabled full trust for the root certificate.

  3. This was the key step: In Windows, I went to Wi-Fi settings > Windows Firewall > Allow an app through firewall > Change settings. I found Charles Web Debugging Proxy and checked both the Private and Public boxes in the checkbox column. After pressing OK, Safari started working with Charles! Thank you everyone for your collective help!

Upvotes: 0

Might be relevant for someone. Go to computer settings >> network and internet >> Wi-Fi >> Windows Firewall >> allow applications through firewall >> change settings >> find Charles and select private checkbox. Sorry for my English

Upvotes: 0

Noah Tran
Noah Tran

Reputation: 3594

There are various reasons why you could not access to http://chls.pro/ssl after setting HTTP Proxy on your iPhone.

The following list is all steps you need to double-check:

  1. Verify your IP and Port that you enter in the Wifi Proxy is matched with the IP/Port from Charles

  2. Turn OFF all VPN apps on your iOS devices. If you're connecting to the VPN -> All traffic does not go through the Proxy Server

  3. Firewall setting: System Preference -> Security & Privacy -> Firewall tab -> Option Verify that:

  • Block All incoming connections is OFF
  • Charles Proxy app is allowed incoming connection
  • If there is no Charles app, please add it by clicking on "+" button
  • Automatically allow built-in software to receive incoming connection is ON
  • Automatically allow downloaded signed software to receive incoming connections is ON

Or simply turn OFF all Firewall setting.

Firewall

  1. Sometimes company security policies block Charles's port. If it's true, ask them to open.

You can read more at https://docs.proxyman.io/troubleshooting/my-ios-devices-couldnt-connect-to-proxyman-via-proxy

Disclaimer: I run Proxyman, an alternative tool for Charles, many users encountered this problem a lot, so I collect all possible reasons and try to fix it. Hopefully, the blog could help you.

Upvotes: 1

Canh Tran
Canh Tran

Reputation: 318

You MUST trust Charles Proxy in your iOS Simulators or Real devices.

Setttings -> General -> About -> Certificate Trust Settings -> Switch On

Upvotes: 0

Related Questions