Charles: Difference between revisions
Line 64: | Line 64: | ||
Obtain the local proxy port, as shown above in [[#Obtain.2FSet_Proxy_Port|Obtain/Set Proxy Port]]. It is usually 8888. Then: | Obtain the local proxy port, as shown above in [[#Obtain.2FSet_Proxy_Port|Obtain/Set Proxy Port]]. It is usually 8888. Then: | ||
curl -x http | curl -x http://localhost:8888 ... |
Revision as of 03:10, 14 February 2019
External
- http://www.charlesproxy.com/documentation/
- http://www.charlesproxy.com/documentation/using-charles/
- http://blog.mediarain.com/2009/08/iphone-http-connection-debugging/
- http://www.charlesproxy.com/documentation/using-charles/ssl-certificates/
- http://www.charlesproxy.com/documentation/faqs/ssl-connections-from-within-iphone-applications/
Overview
Operations
Obtain/Set Proxy Port
Go to Proxy -> Proxy Settings -> HTTP Proxy -> Port.
Configure SSL Proxying
Proxy -> SSL Proxy Settings -> SSL Proxying
and then list the target location you want to proxy for.
Examples:
- localhost.apple.com:443
- kibana.apps.openshift.novaordis.io:443
Export the Root Certificate
Exporting the root certificate is necessary when we proxy a Java application that sends HTTPS requests and we need Charles to be able to look inside those requests. All Java applications that use HttpClient will work based on this procedure.
To export: Help -> SSL Proxying -> Save Charles Root Certificate
Use the default format "Base 64 encoded certificate (.crt)".
The certificate thus saved can be used without any modification as part of the following procedure:
Install Charles Root Certificate
Install the Root Certificate on Mac
Help -> SSL Proxying -> Install Charles Root Certificate.
This will install the self-signed root certificate in Keychain Access.
You will then need to navigate to it, select Trust then "When using this certificate Always Trust"
Install the Root Certificate in Chrome
1. Export the root certificate in ~tmp.
2. Go to Preferences -> Advanced -> Manage Certificates.
3. Go to the Trusted Root Certification Authorities tab. If on Mac, you will be sent to Mac Keychain Access. If Charles was previously used to "Install Charles Root Certificate", the root certificate should already be available there and there should be nothing else to do.
Recording Settings
Include/Exclude
Using curl with Charles
Obtain the local proxy port, as shown above in Obtain/Set Proxy Port. It is usually 8888. Then:
curl -x http://localhost:8888 ...