简体   繁体   English

使用FIddler捕获Android应用流量

[英]Capturing Android applicataion traffic using FIddler

So far I managed to capture the traffic of local Java programs & Android browser successfully. 到目前为止,我成功地捕获了本地Java程序和Android浏览器的流量。 However, I failed to capture traffic of my Android application (using HttpsUrlConnection ). 但是,我无法捕获我的Android应用程序的流量(使用HttpsUrlConnection )。

While following the steps in this guide to configure the WiFi network on the device, in the step of downloading the certificate I faced an odd behavior as Chrome raised an error and Firefox installed it without opening the expected dialog: 在按照指南中的步骤在设备上配置WiFi网络的过程中,在下载证书的步骤中,我遇到了一个奇怪的问题,因为Chrome引发了一个错误,而Firefox安装了它却没有打开预期的对话框:

命名证书

But when I try to download it again, it says that the certificate is already installed. 但是,当我尝试再次下载它时,它表示证书已经安装。

Anyway, when running my app (on a real device, Karbonn S203 API 19), there are no requests nor tunnels logged in Fiddler. 无论如何,在运行我的应用程序(在真实设备上,Karbonn S203 API 19)时,Fiddler中没有请求,也没有登录隧道。 I tried a lot including inspecting this thread to no avail. 我做了很多尝试,包括检查线程均无济于事。 In other articles I read about showing tunnels only but I don't have them either. 在其他文章中,我读到有关仅显示隧道的信息,但我也没有。 Am I missing anything? 我有什么想念的吗?

Thanks. 谢谢。

EDIT : I managed to install is "correctly" (with the above screen) from Settings -> Security -> Install Certificate after copying if from PC. 编辑 :如果从PC复制,我设法从Settings -> Security -> Install Certificate ”“正确”安装(使用上述屏幕)。 Still I cannot see the requests in Fiddler. 我仍然看不到Fiddler中的请求。

Apparently the problem occurred due to using some uncommon devices (well, at least uncommon in Europe/North America). 显然,此问题是由于使用了一些不常见的设备(至少在欧洲/北美不常见)引起的。 They've probably made some configuration changes in their AOSP version. 他们可能已经在其AOSP版本中进行了一些配置更改。 When working the same way with Nexus 5 I managed to add the ceritifcate under 'WiFi' and then captured requests successfully. 使用Nexus 5进行相同的操作时,我设法在“ WiFi”下添加了证书,然后成功捕获了请求。

Looks like your app does not use Fiddler as a proxy. 看来您的应用程序没有使用Fiddler作为代理。 When you call openConnection do you pass a Proxy object to it? 调用openConnection时,是否将Proxy对象传递给它? If so, how do you initialize this proxy object? 如果是这样,您如何初始化此代理对象?

You might want to try sending some HTTP traffic through first to make sure you are using the correct proxy settings and then try with HTTPS. 您可能想先尝试通过发送一些HTTP通信,以确保使用正确的代理设置,然后再尝试使用HTTPS。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM