如何配置 Charles Proxy 和 Android 以便我可以查看 HTTPS 会话 [关闭]

2023-11-23

我想使用 Charles Proxy 在我的 Android 手机上查看 HTTPS 会话。我需要查看原始请求/响应内容以调试我的应用程序。我通过在“代理设置”-> SSL 选项卡下添加主机和端口来配置 Charles。当我运行该应用程序时,所有 SSL 调用似乎都很快从 Charles 中消失。有谁知道如何配置 Charles Proxy 和我的 Android 设备,以便它们能够协同工作? Charles 文档没有适用于 Android 设备的信息。


对于安卓7

参考:如何让 charles 代理与 Android 7 nougat 一起工作?

适用于Android7以下的Android版本

从您的计算机上运行 Charles:

  1. Open Proxy Settings: Proxy -> Proxy Settings, Proxies Tab, check "Enable transparent HTTP proxying", and remember "Port" in heart. enter image description here

  2. SSL Proxy Settings:Proxy -> SSL Proxy Settings, SSL Proxying tab, Check “enable SSL Proxying”, and add . to Locations: enter image description here enter image description here

  3. Open Access Control Settings: Proxy -> Access Control Settings. Add your local subnet to authorize machines on you local network to use the proxy from another machine/mobile. enter image description here

在安卓手机中:

  1. Configure your mobile: Go to Settings -> Wireless & networks -> WiFi -> Connect or modify your network, fill in the computer IP address and Port(8888): enter image description here

  2. Get Charles SSL Certificate. Visit this url from your mobile browser: http://charlesproxy.com/getssl enter image description here

  3. 在“命名证书”中输入您想要的任何内容

  4. Accept the security warning and install the certificate. If you install it successful, then you probably see sth like that: In your phone, Settings -> Security -> Trusted credentials: enter image description here

Done.

then you can have some test on your mobile, the encrypted https request will be shown in Charles: enter image description here

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何配置 Charles Proxy 和 Android 以便我可以查看 HTTPS 会话 [关闭] 的相关文章

随机推荐