[英]Using Charles Proxy on Mac OS X selectively for iOS Simulator
Is there any way to use Charles proxy selectively with particular applications like iOS Simulator on Mac OS X? 有没有办法在Mac OS X上有选择地使用Charles代理与iOS模拟器等特定应用程序? Currently while monitoring HTTP traffic to and fro iOS application running with iOS Simulator, Charles also monitors HTTP traffic from other apps like Chrome and Mail app etc. This is really distracting.
目前,在监控与iOS模拟器一起运行的iOS应用程序的HTTP流量时,Charles还会监控来自其他应用程序(如Chrome和Mail应用程序等)的HTTP流量。这实在令人分心。 Is there any way to do this except adding the list of domains that we want to bypass under Charles Proxy settings ?
除了在Charles Proxy设置下添加我们想要绕过的域列表之外,有没有办法做到这一点?
Chrome is really a problem because it uses Mac OS X proxy settings. Chrome确实是一个问题,因为它使用的是Mac OS X代理设置。 I tried extension like Proxy Switchy but it either doesn't help or I don't know how to configure it.
我试过像Proxy Switchy这样的扩展,但它要么没有帮助,要么我不知道如何配置它。
Any pointers will be highly appreciated. 任何指针都将受到高度赞赏。 Thanks!
谢谢!
You can indeed filter the records in Charles proxy. 您确实可以过滤Charles代理中的记录。 Just go to Proxy>Record Settings... Then u can include or exclude any domain that you need to.
只需转到代理>记录设置...然后您可以包含或排除您需要的任何域。 Thats the only way to do it.
这是唯一的方法。 using domain, port, path or query.
使用域,端口,路径或查询。
If you dont wanna record things coming from google Chorme, just disable the option pressing Cmd+Shift+P , this will disable Mac OS X Proxy. 如果您不想记录来自谷歌Chorme的内容,只需禁用按Cmd + Shift + P的选项,这将禁用Mac OS X代理。
Using the Sequence tab, you can set a filter: 使用“序列”选项卡,您可以设置过滤器:
Quick, easy and no proxy menus and settings to worry about. 快速,简单,无需担心代理菜单和设置。
I was trying to do something similar. 我试图做类似的事情。 Consider this as an alternative.
将此视为替代方案。 If you have an iOS device, you can run your app on the device and configure Charles to only show traffic from remote clients by disabling the "Mac OS X proxy"
如果您有iOS设备,则可以在设备上运行应用程序并将Charles配置为仅通过禁用“Mac OS X代理”来显示来自远程客户端的流量
Here is an example setup: Using one remote client (say an iPad in this case) and a Mac running Charles as your proxy host, disable the "Mac OS X proxy" by deselecting the checkbox in Proxy Settings >> Mac OS X Tab >> Enable Mac OS X proxy (See image below.) 以下是一个示例设置:使用一个远程客户端(在本例中为iPad)和运行Charles作为代理主机的Mac,通过取消选中代理设置>> Mac OS X选项卡中的复选框来禁用“Mac OS X代理” >>启用Mac OS X代理(见下图)
By doing so, you essentially filter your simple setup to only display traffic that is coming from remote client (the iPad). 通过这样做,您实际上过滤了您的简单设置,仅显示来自远程客户端(iPad)的流量。
To audit the whole traffic, I actually had to use a real device. 为了审核整个流量,我实际上不得不使用真正的设备。 it's not possible to filter the client app easily with an iOS simulator because the simulator and the host (your mac) shared the same IP.
由于模拟器和主机(您的Mac)共享相同的IP,因此无法使用iOS模拟器轻松过滤客户端应用程序。 But it's pretty nice if you use a device.
但是如果你使用一个设备,这是非常好的。 More info Help > SSL Proxying > Install Charles Root Certificate on a Mobile Device or Remote Browser.
更多信息帮助> SSL代理>在移动设备或远程浏览器上安装Charles Root证书。
BTW. BTW。 To filter my application backend I prefer not to use the basic filter feature (on the bottom) as djibouti33 proposed, but rather Focused Hosts (View > Focused Hosts...).
为了过滤我的应用程序后端,我不想像djibouti33那样使用基本过滤器功能(在底部),而是使用聚焦主机(View> Focused Hosts ...)。 And there is a toggle/check box to hide/show other calls on the sequence list.
并且有一个切换/复选框来隐藏/显示序列列表上的其他调用。 Pretty convenient.
很方便。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.