10 minutes to learn Charles Grab bag (iOS Http/https request)

Source: Internet
Author: User
Tags ssl certificate

    • Charles Installation
    • HTTP Grab Bag
    • HTTPS Grab Bag

1. Charles Installation

Download and install Charles:
https://www.charlesproxy.com/download/

2. HTTP Grab bag (1) View computer IP address
(2) Set up the phone HTTP proxy

To set up an HTTP proxy, connect your phone to your computer, and click WiFi with Wireless LAN
Server for computer IP address: such as 192.168.1.169
PORT: 8888


After setting up the agent, you need to open Charles on your computer to surf the internet

(3) Open Charles on the computer for the HTTP grab packet

Open an app or browser on your phone, if you can't surf the internet, check if the previous steps are correct


Clicking "Allow" allows the list of HTTP requests for the phone to appear


HTTP Grab Pack 3. HTTPS Grab Bag

HTTPS grab packets need to be set up on HTTP capture

Set the front grab packet https is like this


Set after grab packet https long like this



The following is a further setup step for HTTP capture based on HTTP packet capture:

(1) Install SSL certificate to mobile device

Click Help, SSL proxying, Install Charles Root Certificate on a Mobile Device


The pop-up window gets address Chls.pro/ssl


Address of the phone installation SSL certificate

In the Mobile Safari browser Enter the address Chls.pro/ssl, the Certificate Installation page appears, click Install
The phone is set with a password to enter the password to install


Install the certificate
    • Note 1: there are brothers and sisters said Safari browser input This URL chls.pro/ssl not install the certificate situation,
      Pro-Test to (1) set up a good phone HTTP proxy (2) on the computer, Charles is going to drive.
    • Note 2:IOS 10.3 System, need to enable full trust Charles Certificate in settings → general → about Native → certificate trust settings
      (Thanks to @13002171223 for making this point, I didn't upgrade 10.3 before)
(2) Charles set proxy

Proxy--SSL proxying Settings ...


Tick Enable SSL proxying, click Add


The host sets the HTTPS interface to crawl, for example, to catch this



Host completed: https://api.weibo.cn
Port filled in: 443


(3) HTTPS grab packet

Let the phone resend the HTTPS request, you can see the clutch


HTTPS Grab Bag

Note: Do not grab the bag please turn off the phone HTTP proxy, or disconnect from the computer will not connect to the Internet



Roy_liang
Links: http://www.jianshu.com/p/5539599c7a25
Source: Pinterest
Copyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.

10 minutes to learn Charles Grab bag (iOS Http/https request)

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.