因此,以下是几年/几个月前可能对我有所帮助的类似但过时的答案:
为什么我不能在Charles上看到Chrome浏览器上的http或https流量?
如何使charles proxy与Android 7 nougat协同工作?
按照所有的说明,我可以很好地阅读http请求,但不能读取https请求。还是搞不懂我做错了什么。因为我刚刚遵循了上面的指南,所以我自己的帖子不多了。
我认为主要的问题是如何强制我试图调试的应用程序使用我的证书?明显的修改似乎没有起作用。
发布于 2017-06-06 23:56:56
参见这个问题,它更新了Charles4和Android7的答案。
发布于 2021-04-01 07:28:43
对于那些寻找最新安卓版本(8,9,10或++) + CharlesProxy 4.6的人
可以引用这个导轨..。
发布于 2021-04-06 08:40:13
在Android N+中,它需要额外的步骤才能工作。
1.将res/xml/NetworkSecurityconfig.xml添加到项目中。
<network-security-config>
<debug-overrides>
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="user" />
<certificates src="system" />
</trust-anchors>
</debug-overrides>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
<domain-config>
<!-- Make sure your URL Server here -->
<domain includeSubdomains="true">your_production_domain</domain>
<trust-anchors>
<certificates src="user"/>
<certificates src="system"/>
</trust-anchors>
</domain-config>=>确保用要拦截的域替换your_production_domain
2.添加到AndroidManifest.xml中
<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<application android:networkSecurityConfig="@xml/network_security_config" ... >
...
</application>
</manifest>如果无法使其工作,则可以签出具有所有配置的样本代码。
https://stackoverflow.com/questions/43702231
复制相似问题