本文介绍了如何使用Charles Proxy分析来自Android 6模拟器的https流量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想分析我正在为Android开发的应用的https流量。

Charles Web调试代理是我想要使用的工具。我有以下系统配置:

I want to analyze the https traffic of the app I am developing for Android.
Charles Web Debugging Proxy is the tool I want to use for that. I have the following system configuartion:


  • Mac OS X El Capitan版本10.11.5

  • Android Studio 2.1.2


    • Build#AI-143.2915827,建于2016年5月26日。

    • Android SDK工具25.2。 0 rc1

    • 平台版本:API 24:Android 6.X(N)版本2

    • Mac OS X El Capitan Version 10.11.5
    • Android Studio 2.1.2
      • Build #AI-143.2915827, built on May 26, 2016
      • Android SDK Tools 25.2.0 rc1
      • Platform Version: API 24: Android 6.X (N) revision 2

      我已经阅读了StackOverflow上的几篇帖子,例如

      I already read several posts on StackOverflow like e.g.




      • SSL Proxy/Charles and Android trouble
      • How to setup Android Lollipop emulator with Charles Proxy?

      但是我还没到达我的目标。我完成了所有重要步骤:

      But still I didn't reach my goal. I walked through all the important steps:


      • 安装了Charles Root证书并添加到Max OS X Keychain并信任


        • 打开代理设置:代理 - >代理设置,代理选项卡,选中启用透明HTTP代理

        • 打开SSL代理设置:代理 - > SSL代理设置,SSL代理选项卡,选中启用SSL代理

        我可以读取Charles Proxy中的所有http流量任何公关oblems。我也可以阅读https流量 Charles仅列出IP地址。有条目如

        I can read all the http traffic in Charles Proxy without any problems. I also can read the https traffic but Charles only lists IP addresses. There are entries like

        https://173.194.65.188:5228
        

        因此IP地址未解析。如何获得真正的https网址?我是否必须在某处为https激活DNS?

        So the ip addresses are not resolved. How to get real https URLs? Do I have to activate DNS for https somewhere?

        推荐答案

        我也发现这是一个问题。当我想通过Charles Proxy调试网络流量时,我的解决方案是切换到Genymotion模拟器。 Genymotion模拟器将为您提供Charles中的url(s)与ip(s)。

        I too found this to be an issue. My solution when I want to debug network traffic via Charles Proxy, is to switch over to Genymotion emulator. The Genymotion emulator will give you the url(s) vs. ip(s) in Charles.

        在Genymotion模拟器中,您将Wifi代理主机名配置为'10 .0.3.2 '和代理端口输入'8888'(*假设端口8888是您在Charles Proxy中配置的侦听端口)。

        In the Genymotion emulator you configure the Wifi proxy hostname to '10.0.3.2' and Proxy port enter '8888' (*assuming port 8888 is the listening port you have configured in Charles Proxy).

        这篇关于如何使用Charles Proxy分析来自Android 6模拟器的https流量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 05:38