In Web and Internet development you are unable to see what is being sent and received between your web browser or client and the server. Without this visibility it is difficult and time-consuming. LightProxy - ? Cross platform Web debugging proxy. Powerful hosts/proxy/capture based on whistle, what u need is just input /.
Charles Proxy is a HTTP/HTTPS traffic viewer by which you can view the traffic between your device and the internet. Crossover mac. Since the MoPub SDK uses HTTP/HTTPS to request and receive ads, Charles can be used to see what is happening for debugging and testing apps ad request/response.
Install and Register Charles Proxy
- Download Charles Proxy here.
- On the Charles menu bar, go to Help > Register Charles…. You can also use a trial version with some limitations.
Setup Proxy
- Open CharlesThe first time you launch Charles, you will be asked to grant privileges to change your Network Settings. Click “Grant Privileges” and enter your password when prompted.
- Enable Proxy ( Proxy > Proxy Settings… > Proxies )
- Enable SSL Proxying ( SSL Proxy Settings… )Add a wildcard host to enable all SSL:Or explicitly add MoPub host to the list:
- Add MoPub host to Focussed Hosts ( View > Focussed Hosts… > Add )
Web Debugging Proxy Ios
Connect Your Devices
Android
- Go to Settings > WiFi and connect to the network your computer is connected to
- Long press the network until the modal appears, then click Modify Network. Select Advanced Options to reveal proxying options. Configure the following:
iOS
- Go to Settings > WiFi and connect to the network your computer is connected to
- Select “i” next to the network, and scroll down to HTTP Proxy and select Manual. Configure the following:
You should see a prompt when your device successfully connect to your computer, press Allow to complete the connection.
Install SSL Certification on Your Devices
- Go to Help > SSL Proxying > Install Charles Root Certificate on a Mobile Device…
- On your Android or iOS device, follow the instruction to browse to http://chls.pro/ssl to download and install the certificate.
- Navigate to Settings > General > Profile & Device Management to install and verify the Charles SSL certificate.
- Navigate to Settings > General > About > Certificate Trust Settings to mark the Charles Root certificate as trusted.
Important
On Android 7+ :
If Charles is not able to decrypt https traffic, please follow this insturction to add a
network_security_config.xml
and modify your AndroidManifest.xml
in your app.res/xml/network_security_config.xml
AndroidManifest.xml
Note: please remember to revert this before your app goes live.
On iOS 10.3+ :
You have to go to Settings > General > About > Certificate Trust Settings to toggle the full trust of the certificate.
Test and View MoPub Ad Requests/Responses
- Launch MoPub Sample App or your own apps that has integrated MoPub SDK.
- Go to Charles Files > New Session to start a new recording if need be.
- Click on the besom icon to clear the logs, and make sure to enable the recording.
- Trigger ad requests and reproduce any issues you’ve encountered.
- You should start seeing the ad requests and responses decrypted as below:
- Click Focused or type ‘mopub’ into the Filter to filter out the traffic that are sent through the MoPub server.Below will be exposed in the Charles log if ad requests to MoPub were captured:
- MoPub ad request:
- http://ads.mopub.com/m/ad
- MoPub attempt tracker:
- http://ads.mopub.com/m/attempt
- MoPub impression tracker:
- http://ads.mopub.com/m/imp
- http://mpx.mopub.com/imp (for Marketplace only)
- MoPub click tracker:
- http://ads.mopub.com/m/aclk
- http://mpx.mopub.com/aclk (for Marketplace only)
- MoPub conversion tracker:
- http://ads.mopub.com/m/open
- MoPub ad request:
- Disable the recording.
Save and Send Session Logs
- Ensure your session logs are decrypted.
- Recorded sessions can be saved as
.chls
files, or exported as HTTP Archive (HAR) logs from File > Export Session… - Send the files to your account manager.
FAQ
Why can’t I see any traffic recorded in Charles?
- Ensure your Charles Recording toggle is on.
- Confirm if your mobile and your computer are connecting to the same WiFi.
- Confirm if the proxy IP is identical with your computer’s IP.
- Restart your Charles tool on your computer, and reconnect your devices to the WiFi.
- Disable any VPN on your mobile.
Why is my https logs are encrypted?
- Ensure your SSL Proxying is enabled and already allowlisting correct host name.
- Redo the steps in the secton: “Install SSL Certification on Your Devices”.
- Restart your Charles tool on your computer, and reconnect your devices to the WiFi.
Last updated October 01, 2020
TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.
Charles Web Debugging Proxy Download
© 2020 MoPub (a division of Twitter, Inc.)