Basic guide

Setup Charles on macbook

Step 3: Install Charles app for your macbook
Step 4: Install Charles root certificate
Charles > Help > SSL Proxying > Install Charles Root Certificate
Note: remember to change settings to always trust for this Certificate in Keychain Access
(Search : Charles in your keychain access)

Step 5: Setting SSL Proxy setting
Charles > Proxy > SSL Proxy Setting :
Enable SSL Proxying
Location : add *.*
add * , port 443 ( or * )

Step 6: Enable capture SSL
Click on the request, choose SSL Proxying : Enable

Step 7: Restart charles

Setup your iphone

Step 1: Setup wifi connection to connect via proxy server run on your macbook
Go to Settings > Wifi > Click info button for your wifi > Configure Proxy > Manual
Server => fill your laptop ‘s ip address, eg: 192.168.1.7
Port: 8888 (charles proxy default port)
Authentication: off

Step 2: Setup Proxy Certificate
Visit
https://chls.pro/ssl
Download certificate

Go to Settings > Profile and certificate
Install Charles Proxy Certificate

Step 3: Trust Certificate
Go to Settings > General > About > Certificate Trust Settings
Enable Charles Proxy Certificate

Setup your android device

Use the following steps to configure your Android device to use Charles proxy:

Go to Settings > Wifi.
Press and hold down the power key on the Wifi Network device you are currently connected to.
When the modal displays, select Modify Network.
Select Show Advanced Options to display proxying options.
Under Proxy, select Manual.
In the Proxy Host Name box, enter the IPV4 Address you previously saved from your development machine.
In the Proxy Port field, enter 8888, as when configuring Charles.
undefined
Click Save to save the settings and exit.
Open a browser on your device to test.
Charles displays a dialog prompting you to allow or deny SSL proxying.
Click Allow.
If you are not prompted to allow SSL proxying, restart Charles and try again.
Go to http://charlesproxy.com/getssl from your device and download the Charles SSL certificate.
On newer versions of Android, you may get an error on downloading, such as “download unsuccessful”.
If this happens, use the following instructions:
Go to Help > SSL Proxying > Save Charles Root Certificate.
undefined
Change the file type from the default .pem to .cer and save in a location that you will remember for later.
Transfer the .cer file to your device using an SD Card, USB Cable, or remote transfer such as Google Drive.
Open the file from a file manager such as the Android File Manager, or a third party file manager such as File Commander.
You will be prompted to save the certificate.
Continue with the remaining steps.
Name the certificate and okay it as a trusted certificate.
Ensure that you disable or remove it when complete.
Once the certificate is installed, you are prompted to set up a PIN.
When prompted, add the new PIN.
Additional Configuration Steps for Android N and Above

As of Android N, additional steps area required to to add configuration to your application so that it trusts the SSL certificates generated by Charles SSL proxying. This means that you can only use SSL proxying with applications that you control.

In order to configure your app to trust Charles, you must first add a Network Security Configuration File to your app. This file can override the system default, enabling your app to trust user-installed CA certificates, such as the Charles Root Certificate.

Handle error unknow on capturing request

https://stackoverflow.com/questions/33322334/charles-proxy-response-unreadable

Can no longer browse without Charles running

It is likely that your browser’s proxy settings have been changed to use Charles and then, for some reason, not changed back.

First try starting and quiting Charles normally to see if that corrects the problem. Because if Charles is stopped abnormally (such as a crash) it doesn’t have an opportunity to reset your proxy settings. It should notice that when it is restarted.

If that doesn’t work you’ll need to fix your proxy settings manually. How you do this depends on what application is misconfigured:

Windows / Internet Explorer
First quit Charles. Then go to the Internet Options in your Control Panel. Go to the Connections tab. Click on the LAN Settings. You’ll see a Proxy panel. Uncheck the Use a Proxy checkbox. Click OK until you’ve closed the Internet Options.

Mac OS X
Go to your System Preferences. Open the Network preferences. Choose the appropriate Network Port (you may need to reconfigure more than one if you have more than one) and click Configure. Go to the Proxies tab. Look in the list of proxy servers, you will see that Web Proxy and Secure Web Proxy are active. Uncheck those or reconfigure them as required for your network. Click Apply Now and then close the Network preferences.

Firefox
First quit Charles. Then go to the Firefox Preferences window, General tab, click Connection Settings. Then choose “Direct Connection to the Internet” or enter whatever proxy settings are required for your network. Click OK and then close the Preferences window.

Use ProxyMan

https://proxyman.io/

More document

https://www.charlesproxy.com/documentation/faqs/using-charles-from-an-iphone/

https://community.tealiumiq.com/t5/Tealium-for-Android/Setting-up-Charles-to-Proxy-your-Android-Device/ta-p/5121

About the Author

Trần Huy

View all author's posts

Bài viết khác

Flutter Navigation and Routing

Trong Flutter, việc chuyển đổi giữa các màn hình (screen/page) được thực hiện thông qua Navigator và Route. Flutter cung cấp hai loại điều hướng chính: Named Route: Sử dụng chuỗi định danh (string) để gọi màn hình. Direct Route: Sử dụng đối tượng Route để gọi màn hình. Navigator là một widget quản lý […]

Flutter State Management

SetState là cách cập nhật trạng thái cơ bản: Provider – Một nhà cung cấp thì dùng ChangeNotifierProvider Dùng navigator. Màn hình như ngăn sếp push vô pop ra. Provider có thể quản lý trạng thái ở nhiều màn hình khác nhau. Dùng với comsumer có thể dùng tham số trực tiếp truy xuất thay vì dùng […]

Flutter Layout

Cơ chế cốt lõi để xây dựng nên layout trong Flutter là Widget. Hầu như tất cả mọi thứ đều là Widget Ảnh, icon, text, rows, columns, grid, arrange, constrain, align,… Material apps – Sử dụng Scaffold widget. Chúng ta có thể sử dụng widget trong phần body. Non-Material apps Aligning widget mainAxisAlignment và crossAxisAlignment cung […]

Flutter Widget

Flutter Widget là thành phần cơ bản nhất trong Flutter, được sử dụng để tạo ra giao diện người dùng (UI). Mọi thứ trong Flutter, từ văn bản, hình ảnh, nút bấm cho đến toàn bộ giao diện ứng dụng, đều là widget. Widgets trong Flutter là bất biến (immutable), tức là khi trạng thái […]

Flutter Package

Flutter Package là một bộ mã nguồn chứa các chức năng được viết sẵn giúp lập trình viên có thể tái sử dụng trong ứng dụng của mình. Các package này thường được chia sẻ công khai và được sử dụng để tăng tốc quá trình phát triển, bổ sung các tính năng hoặc tích […]

Cài đặt Flutter – MacOS

Để cài đặt Flutter trên hệ điều hành của bạn, bạn có thể làm theo hướng dẫn sau tùy theo hệ điều hành của mình. Flutter hỗ trợ Windows, macOS, và Linux. Dưới đây là các bước cài đặt Flutter cho từng hệ điều hành MacOS Bước 1: Tải Flutter SDK Truy cập: https://docs.flutter.dev/get-started/install/macos/mobile-ios Tải xuống […]