What is Charles Proxy?
Charles Proxy sits between your app and the Internet. All networking requests and responses will be passed through Charles Proxy, so you’ll be able to inspect and even change data midstream to test how your app responds.
How does Charles Proxy work with mobile devices?
Go to Charles Proxy Download page and follow instructions to download and install it on your computer.
Configuring Charles Proxy and your mobile device
1. Configure Charles Proxy
After opening Charles Proxy go ahead and disable Windows Proxy / MacOS Proxy / Mozilla Firefox Proxy (they are enabled by default) as this will just generate extra data that is not needed when you are testing through a mobile device. Also, no need to install Firefox plugin.
2. Get proxy port number
In the task bar click "Proxy settings" and make a note of the proxy port number "8888".
3. Get the local IP address in the network
Click on Help > Local IP address and you'll see an IP address that is usually formatted as 192.168.x.x or 10.0.x.x. Use this IP Address in step 4d.
4. Add proxy server settings to your iPad / iPhone / iPod Touch
a) Navigate to the ‘Settings’ app and tap on ‘WiFi’
b) Next, tap on the WiFi network you need to add the proxy to. This should be one you are currently connected to.
c) This next page will display all of your network information, for the network you are connected to. Scroll down to the ‘HTTP Proxy’ settings and tap ‘Manual’.
d) A new box will appear below the setting. Fill in the Proxy Server address which is the IP address you got from step 3. Fill in the Port which you got from step 2. Don't turn on Authentication.
e) Once complete, exit the ‘Settings’ App and you’re good to go!
5. Install SSL certificates on your mobile device
Open Safari on your mobile device and browse to https://chls.pro/ssl. Safari will prompt you to install the SSL certificate. iOS 10.3+ users must explicitly trust the certificate by going to Settings > General > About > Certificate Trust Settings
You're all set up now to track your mobile device traffic and record it on your computer through Charles Proxy
- Clear previous logs before you start testing new functionality.
- To install or remove certs in iOS system, follow iGeeksBlog tutorial.
- When all else fails, a restart of both PC and mobile device may solve issues, but make sure to Disable the Windows Proxy / MacOS proxy / Mozilla Firefox Proxy again.
- You should periodically update your certificates as they do expire.
- Some routers re-assign local IP addresses, so you should verify the IPv4 has not changed.