How to Setup Charles Proxy for Mobile App Testing
Charles Proxy is an essential tool for mobile app testing, allowing you to intercept, inspect, and modify HTTP/HTTPS traffic between your mobile device and the internet. This guide walks you through setting up Charles Proxy for both iOS and Android devices.
✅ Prerequisites
Before you begin, make sure you have:
- 💻 Charles Proxy installed on your computer (Download here)
- 📱 A mobile device (iOS or Android)
- 📡 Both devices connected to the same WiFi network
- 🔑 Charles Proxy license (optional, but recommended for production use)
📥 Step 1: Install and Configure Charles Proxy
1.1 Download and Install
- Download Charles Proxy from charlesproxy.com
- Install the application on your computer
- Launch Charles Proxy
1.2 Enable SSL Proxying
Charles Proxy needs to be configured to decrypt HTTPS traffic:
- Go to Proxy → SSL Proxying Settings
- Check Enable SSL Proxying
- Click Add under SSL Proxying
- Add location:
- Host:
*(wildcard for all hosts) - Port:
443
- Host:
- Click OK
🖥️ Step 2: Configure Your Computer
Find Your Computer's IP Address
On Mac:
ifconfig | grep "inet " | grep -v 127.0.0.1
On Windows:
ipconfig
💡 Note: Your local IP address usually starts with 192.168.x.x or 10.0.x.x
Configure Charles Proxy Port
- Go to Proxy → Proxy Settings
- Note the port number (default is
8888) - Keep this window open for reference
📱 Step 3: Configure Your Mobile Device
🍎 For iOS (iPhone/iPad):
- Open Settings on your device
- Tap Wi-Fi
- Tap the (i) icon next to your connected network
- Scroll down to HTTP Proxy
- Select Manual
- Enter:
- Server: Your computer's IP address (from Step 2)
- Port:
8888(or your Charles port)
- Tap Save
🤖 For Android:
- Open Settings
- Go to Network & Internet → Wi-Fi
- Long-press on your connected network
- Select Modify network
- Tap Advanced options
- Set Proxy to Manual
- Enter:
- Proxy hostname: Your computer's IP address
- Proxy port:
8888
- Tap Save
🔐 Step 4: Install SSL Certificate
To decrypt HTTPS traffic, your mobile device needs to trust Charles' SSL certificate.
🍎 For iOS:
- On your mobile device, open Safari
- Go to
chls.pro/ssl(Charles SSL certificate download) - Tap Allow when prompted to download the profile
- Go to Settings → Profile Downloaded
- Tap Install (enter passcode if prompted)
- Tap Install again to confirm
- Go to Settings → General → About → Certificate Trust Settings
- Enable full trust for the Charles Proxy certificate
- Tap Continue to confirm
🤖 For Android:
- On your mobile device, open Chrome
- Go to
chls.pro/ssl - Download the certificate
- Go to Settings → Security → Install from storage
- Select the downloaded certificate
- Name it "Charles Proxy" and tap OK
✔️ Step 5: Verify the Setup
- Open Charles Proxy on your computer
- You should see a popup asking to allow connection from your device
- Click Allow
- Open any app or browser on your mobile device
- You should see traffic appearing in Charles Proxy
🎉 Success! If you see traffic, you're all set up!
⚠️ Common Troubleshooting
❌ Issue: No Traffic Appearing
Solutions:
- Verify both devices are on the same WiFi network
- Double-check the IP address and port configuration
- Restart Charles Proxy
- Restart your mobile device's WiFi connection
🍎 iOS: Certificate Not Trusted
Solution:
- Go to Settings → General → About → Certificate Trust Settings
- Make sure Charles certificate is enabled
❌ Issue: "SSL Handshake Failed" Errors
Solutions:
- Ensure SSL Proxying is enabled in Charles
- Verify the certificate is properly installed on the device
- Add
*:443to SSL Proxying locations
🔒 Issue: Some Apps Don't Show Traffic
Explanation: Some apps use certificate pinning, which prevents proxy inspection. This is a security feature and cannot be easily bypassed.
💡 Best Practices
- Disable proxy when done testing - Remember to turn off the proxy settings on your mobile device when you're finished
- Use filters - Set up Charles filters to focus on specific domains or URLs
- Save sessions - Use File → Save Session to keep recordings for later analysis
- Clear sessions - Use Proxy → Clear Session to start fresh
🚀 Next Steps
Now that Charles Proxy is set up, you can:
- 🔍 Inspect API requests and responses
- ✏️ Modify requests using Breakpoints
- 🐌 Throttle bandwidth to simulate slow connections
- 🔄 Record and replay sessions for debugging
🛠️ Useful Charles Proxy Features
- Breakpoints: Pause requests/responses to modify them
- Map Remote: Replace remote resources with local files
- Throttling: Simulate different network conditions
- Repeat: Replay requests to test API behavior
💡 Pro Tip: Create a dedicated WiFi network or hotspot on your computer for testing. This makes it easier to manage proxy settings without affecting your main internet connection.
📚 Resources
Have questions or run into issues? Feel free to reach out!