当前位置:网站首页>Charles -- teach you how to use the packet capturing tool from 0-1
Charles -- teach you how to use the packet capturing tool from 0-1
2022-07-29 01:00:00 【Mei hegui】
1. install
Go to the official website to download , Address :https://www.charlesproxy.com/download/
2. Activate
Here is the activation account found online , Just fill in
![Registered Name: https://zhile.io
License Key: 48891cf209c6d32bf4 ])
3. To configure
3.1 Certificate installation
Help->ssl proxying
- Charles Root Certificate
- Charles Root Certificate in iOS Simulators
- Change the key chain to always trust

- iphone Certificate installation

open Charles Root Certificate on a Mobile Device or Remote Browser, It will appear as shown in the figure
Configure the agent first , Jump 3.2/3.3 Configure agent , Access after configuration
Chls.pro/ssl
A pop-up box will pop up asking whether to install , Agree to install .
Don't be happy too soon , The installation is completed on the mobile phone Set up -> Universal -> About the machine -> Certificate trust settings ->charles Proxy CA, Tick the switch , The certificate takes effect .
3.2 Agent settings
You can set the packet capture data type , Include http And socket data . You can do it on demand proxies Check under column .
If you need to catch Mac Browser data on , Need to be in macOS bar , Check http.
3.3 Mobile phone use agent
Connect your mobile phone to the LAN wifi, And charles It must be under the same external network .
- Automatic agent
On the connected wifi Click more , Enter the configure agent page . Check auto , In the input box URL Input in :
Https://chls.pro/10.10.11.235:6666.pac
That is, automatic proxy is set .
- Manual proxy
Input charles Of ip And port
3.4 HTTPS Grab the bag
HTTPS Grab the bag , Need to go through SSL.
Proxy->SSL Proxy setting
The following interface will be opened . Click on Add,Host Column and Port Fill in all columns ( Means to catch all SSL request ), Sure you can. .
notes : If this item is not configured , During a visit to https Data time , You will find that the visit failed ,Structure The bar shows the small lock logo .
3.5 Accessible control
charles Can pass Access control Settings To control the allowed access list . If this machine is not allowed IP, Visit will not go Charles, Of course, I can't catch the bag .
Not configured obsolete , The list is empty. . When the phone first visits ,charles Whether to allow pop-up box will pop up , Click on allow, I agree to this mobile connection .
Of this phone ip The address will also appear in Access control Settings List of .
I am generally configured to allow all , stay Access control Settings in Add, Input 0.0.0.0/0, Can be added to .
3.5 Map Local
This feature is quite useful , Data can be requested response Get from local file .
such as : I have a system upgrade function , Upgrade mode upgradeType There are three kinds of : mandatory / Ordinary / silent , However , I want to test and verify three scenarios , You have to bother the background to modify the data . Now ,Map Local It's time to play .
Save remote response:

Set up Map Local:


Hit the saved json file , Modify the return value :

Then re request , It will leave your modified local file data . Don't bother back-end students frequently anymore , You can simulate various data scenarios by yourself .
How to close ?charles The toolbar -> Tools -> Map Local, Click to enter
4. Some common questions
4.1 Stuck in real machine verification application ?
Developed as apple , A lot of times Xcode Make yourself small Demo Run it on the phone , It uses a free personal certificate , You need to trust the certificate on your mobile phone , And verification application . If you set packet capture ,ssl It can't be verified .
terms of settlement :
ssl when , Only catch the designated website , Don't set full grasp * .charles The toolbar -> Proxy -> SSL Proxy Settings, Only focus on the background address of the project .
5. summary
Go through the above steps , You can grasp happily https 了 . To sum up :
certificate :Mac/ Simulator /iphone certificate ( Don't forget to trust certificates ).
Proxy setting Check HTTP And SOCKS.
Same LAN .
Mobile settings agent .
Access control Settings Agree to access SSL proxy Add star .
Of course ,charles It's more than that , Very powerful , There are many functions waiting to be discovered . Such as : The breakpoint / Intercept , Return the modified data / Simulated disconnection / Analog network is poor .
Link to the original text :https://www.jianshu.com/p/9f4ebde9c518
边栏推荐
- ThinkPHP高仿蓝奏云网盘系统程序
- Consumer unit 消费单元
- Educational Codeforces Round 132 (Rated for Div. 2)【A~C】
- Error reporting: when the browser clicks the modify add button, there is no response and no error reporting. Solution
- C语言括号匹配(栈括号匹配c语言)
- 直流无刷电机控制器(换电机霍尔收费多少)
- 双链表的定义 ~
- I don't recommend you use Select*
- 从零开始实现lmax-Disruptor队列(六)Disruptor 解决伪共享、消费者优雅停止实现原理解析
- 自制 | 纯手工自制一个16位RISC架构CPU
猜你喜欢

Requestvideoframecallback() simple instance

自制 | 纯手工自制一个16位RISC架构CPU

Tips for API interface optimization

Xinchi technology released the latest flagship product of G9 series, equipped with six A55 cores with 1.8GHz dominant frequency

B-tree~

iNFTnews | 元宇宙购物体验将成为吸引消费者的一大利器

DDD领域驱动设计如何进行工程化落地

Method of converting inline elements to block elements

Hash table~

【树莓派】widows电脑如何与树莓派连接
随机推荐
Several methods of multi-threaded sequential operation can be asked casually in the interview
CUDA related
NFT 项目的 7 种市场营销策略
Kwai focuses on regulating the number maintenance behavior in the ways of handling and manuscript washing, and how to purify the content ecology on the we media platform
How to explain JS' bind simulation implementation to your girlfriend
AQS原理
Outlier detection and open set identification (1)
追踪伦敦银实时行情的方法
Download the latest version of visual studio code and connect to the server remotely (very detailed)
redis版本怎么查看(查看redis进程)
Copu Professor Lu Shouqun was invited to give a keynote speech at the open atom global open source summit
从零开始实现lmax-Disruptor队列(六)Disruptor 解决伪共享、消费者优雅停止实现原理解析
Station B "crashed" from beginning to end 2021.07.13 we collapsed like this (Reprint)
Implement Lmax disruptor queue from scratch (VI) analysis of the principle of disruptor solving pseudo sharing and consumers' elegant stopping
[Commons lang3 topic] 002 randomutils topic
[web development] basic knowledge of flask framework
Flash and seven cattle cloud upload pictures
自制 | 纯手工自制一个16位RISC架构CPU
【commons-lang3专题】001-StringUtils 专题
保护性拷贝&无状态