你如何监控 iPhone 上的网络流量? [英] How do you monitor network traffic on the iPhone?

查看:32
本文介绍了你如何监控 iPhone 上的网络流量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在寻找一种类似于 Wireshark 的工具,用于在与第 3 方合作之前在 iPhone 上测试第 3 方应用程序.有什么建议吗?

We are looking for a Wireshark-like tool to use on the iPhone to test a 3rd party application before partnering with the 3rd party. Any suggestions?

推荐答案

如果您只想查看 HTTP/HTTPS 流量,就像其他答案所建议的那样,中间人代理是一个很好的解决方案.

A man-in-the-middle proxy, like suggested by other answers, is a good solution if you only want to see HTTP/HTTPS traffic.

>

我发现的数据包嗅探的最佳解决方案(尽管它仅适用于实际 iOS 设备,而不适用于模拟器)是使用 rvictl.这篇博文写得很好.基本上你这样做:

The best solution for packet sniffing (though it only works for actual iOS devices, not the simulator) I've found is to use rvictl. This blog post has a nice writeup. Basically you do:

rvictl -s <iphone-uid-from-xcode-organizer>

然后您使用 Wireshark(或您最喜欢的工具)嗅探它创建的界面,完成后关闭界面:

Then you sniff the interface it creates with with Wireshark (or your favorite tool), and when you're done shut down the interface with:

rvictl -x <iphone-uid-from-xcode-organizer>

这很好,因为如果你想嗅探模拟器的数据包,你还必须通过流量到本地 Mac,但是 rvictl 创建一个虚拟界面,只显示流量来自您插入 USB 端口的 iOS 设备.

This is nice because if you want to packet sniff the simulator, you're having to wade through traffic to your local Mac as well, but rvictl creates a virtual interface that just shows you the traffic from the iOS device you've plugged into your USB port.

注意:这只适用于 Mac.

Note: this only works on a Mac.

这篇关于你如何监控 iPhone 上的网络流量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆