2016-05-17 62 views

回答

2

您需要创建一个SSL证书,然后将其添加到charles和您的应用程序。

有一个关于如何创建证书,并获得查尔斯在这里使用它的一些说明: http://codeblog.shape.dk/blog/2014/01/06/custom-ssl-certificate-with-charles-web-proxy/

(我读了整个博客文章,但相关的位在节“自定义SSL证书” )

然后,根据您的要求,您需要通过添加具有配置选项的network_security_config.xml文件来满足您的需求,以获得您的应用程序(或其中的一种)。本主题在以下链接描述:

https://developer.android.com/preview/features/security-config.html

https://android-developers.blogspot.co.uk/2016/07/changes-to-trusted-certificate.html

+0

我已经尝试在应用程序的调试版本中嵌入charles CA,如下所示: https://developer.android.com/training/articles/security-config.html#TrustingDebugCa 不幸的是,它似乎并不上班。如果问题是证书,我们仍然会在Charles中看到加密的流量。对我来说,我没有看到任何流量,这意味着这个问题与代理有关。 – OldSchool4664

+0

我已经成功地使用了上面的机制来用charles读取N个流量。没有关于你的具体情况的额外信息,我不能提供任何见解抱歉。 – Simon