gpt4 book ai didi

android - 将手机更新到 Android 9 后无法使用 Charles Proxy

转载 作者:行者123 更新时间:2023-11-29 00:55:30 28 4
gpt4 key购买 nike

我将我的测试设备(Samsung galaxy Note 9 和 galaxy S9+)更新到了 Android 9。现在我无法使用 Charles 代理来 grep 任何流量。我已经将我的 Charles Proxy 更新到最新版本 4.2.8 (MAC)而且我像过去一样在 Wifi 设置上配置了代理。

注意:Charles Proxy 在更新前运行良好(Android 8.0 用于 S9+,8.1 用于 Note 9)

最佳答案

SSL Certificates | Charles

As of Android N, you need to add configuration to your app in order to have it trust the SSL certificates generated by Charles SSL Proxying. This means that you can only use SSL Proxying with apps that you control.

将文件 res/xml/network_security_config.xml 添加到您的应用:

<network-security-config> 
<debug-overrides>
<trust-anchors>
<!-- Trust user added CAs while debuggable only -->
<certificates src="user" />
</trust-anchors>
</debug-overrides>
</network-security-config>

然后在您应用的 list 中添加对该文件的引用,如下所示:

<?xml version="1.0" encoding="utf-8"?>
<manifest ... >
<application android:networkSecurityConfig="@xml/network_security_config" ... >
...
</application>
</manifest>

重新安装 charles 代理后,重新创建证书。

关于android - 将手机更新到 Android 9 后无法使用 Charles Proxy,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55160416/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com