Is there any way to monitor request of application such as terminal? Now I can monitor chrome but other application not.
My charles's version is 4.2
Viewing Requests There are two different ways of viewing the session window: structure view and sequence view. Structure view lets you view the requests in a tree organised by the host name and then folders/directories within the host. Sequence view lets your view the requests in the sequence that they occur.
Check the proxy configuration. Open Charles Proxy, if it is not already open. Open your mobile device's browser and navigate to a site. Grant access when prompted that a device is trying to connect to your network. You should now see your mobile device's traffic in your Charles Sequence log.
Open Settings, tap Wi-Fi and verify you're connected to the same network as your computer. Then, tap the ⓘ button next to your Wi-Fi network. Scroll down to the HTTP Proxy section, select Configure Proxy and then tap Manual. Enter your Mac's IP address for Server and the Charles HTTP Proxy port number for Port.
After completing charles session you can launch http://control.charles/session/export-json url to get the JSON format of the request.
I think it depends on the command line you are trying to monitor. To purely capture http requests made from terminals you just need to set the environment variable 'http_proxy' such as:
$ export http_proxy="http://localhost:8888"
$ curl "http://www.google.com"
This will make Charles capture the HTTP request to Google, but this may not happen with all applications started from this terminal. You'll probably have to find the way to configure the proxy on those other applications.
Just as an example, if you want to capture http requests from a java application you are developing, you will need to add the proper proxy configuration to the java command line, something like:
$ JAVA_FLAGS="-Dhttp.proxyHost=localhost -Dhttp.proxyPort=8888 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=8888"
$ java $JAVA_FLAGS ...
To enable HTTPS sniffing with Charles you will need to add the certificate to the JVM's keystore with:
$ keytool -import -alias charles -file charles-ssl-proxying-certificate.cer -keystore $JAVA_HOME/jre/lib/security/cacerts
Please, notice that
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With