-
Notifications
You must be signed in to change notification settings - Fork 3
Constructor's SDK and Charles
Jimmy Li edited this page Mar 29, 2021
·
7 revisions
Constructor's SDK communicates with Constructor's servers using HTTPS requests. This tutorial will allow you to spy on requests and responses to validate that tracking events and requests for results work as expected.
Your computer and your test device will need to be on the same WiFi network for this to work. We will be proxying traffic from your device to Constructor's servers through your computer so that we can view the requests and responses in plain text.
Make sure that you are connected to whatever VPN you need to be connected to in order to access other domains outside of Constructor i.e (http://staging.yourdomain.com)
Note: Android apps may have additional network configuration in production builds to make this work.
- Install Charles proxy from https://www.charlesproxy.com/
- Start Charles proxy
- Enable SSL proxying for *.cnstrc.com


- Option + click on the WiFi symbol on macOS to get your device's local IP Address (192.168.x.x)
- Go to Proxy / Proxy Settings > to discover the port to connect your device to (8888)


- Go to your WiFi settings, select your current WiFi network, and edit your proxy settings from None to Manual






- Set your proxy hostname to the IP Address of the device that has Charles running (192.168.x.x)
- Set your proxy port to the port that Charles is running on (8888)

- In Charles, allow the incoming connection from your Android Device
- From a browser on your device, visit http://chls.pro/ssl and download the SSL certificate from Charles
- Go to Settings > Security > Scroll down and click on Advanced > Encryption & credentials > Install a certificate > CA certificate > Install anyway
- Find the file and click on it to install (It should be located in the Downloads folder. Click on the hamburger menu on the top left to access it)
- Clear existing traffic
- Toggle to sequence instead of structure

- Filter traffic on cnstrc.com
- Snoop on HTTPS traffic
- Trigger events/requests within the app
- Make sure that you can see both requests and responses (responses will be in plain text if the SSL certificate installed correctly)

- Remove the proxy setting on your device