Charles View HTTPS request data mac/android

Source: Internet
Author: User

Charles_v4.0.2_mac_ cracked version: Https://pan.baidu.com/s/1dEQCSDV

1. Install Charles Root certificate on Mac computer

Open charles-> Menu Help->ssl proxying->install Charles Root Certificate

Enter system user name password, select the [System] type, add complete, locate the Charles Proxy CA certificate, and double-click Open:

"Trust" there select "Always trust" and close the window after Setup:

2. Install the certificate on the phone

Back to Charles, menu Help->ssl proxying->install Charles Root Certificate on a Mobile Device or Remote Browser

According to the prompt in the pop-up window, turn on the phone, wifi settings, connect the proxy settings to Charles, and then open the browser in the phone to access the Web page prompted by the URL, preferably with HTTP (many browsers do not input HTTP//will become a jump search interface), For example, my side is to visit: Http://chls.pro/ssl,

If the browser is just pop-up file download, file download and can not be installed, you need to change a browser, such as my Xiaomi phone is so, I changed the UC Browser can be normal pop-up installation certificate interface, name random, use to select "VPN and Application", and then determine:

3. What HTTPS interfaces are set on Charles

You can right-click on the link already displayed on Charles, select [Enable SSL proxying] In the popup menu, and then re-request the interface to see the parameters of the link request.

You can also set it in the Charles menu: [Proxy]->[ssl proxying Settings]

In the popup screen, tick "Enable SSL proxying" and click "Add" at the bottom to add an HTTPS request that requires a proxy:

[Host] Fill in the domain name, you can use "*" instead of other characters, such as *.163.com so 163.com all connections under this domain can match

"Port" is a fixed 443, and then re-request the HTTPS interface after Setup.

Precautions:

1, if you change a computer, the phone also to re-access the link to add a new certificate

2, Android N 7.0 and the above system will be error:

The solution is in the Android app project: Create a new file under the Res\xml directory Network_security_config.xml content as follows:

<?xml version= "1.0" encoding= "Utf-8"?>
<network-security-config>
<debug-overrides>
<trust-anchors>
<!--Trust user-added ca--> only when you can debug
<certificates src= "User"/>
</trust-anchors>
</debug-overrides>
</network-security-config>

Then open androidmanifest.xml, add android:networksecurityconfig= "@xml/network_secruity_config" to the properties of "application"

<application
android:icon= "@drawable/icon"
Android:label= "@string/app_name"
Android:theme= "@style/theme.appcompat.light"
android:networksecurityconfig= "@xml/network_security_config" >

Re-packaging run the installation, the above configuration only the debug package is valid, the formal package is still not normal agent Https,release package to see the HTTPS agent can find an Android 7.0 system under the machine

Charles View HTTPS request data mac/android

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.