在iOS端如何使用Charles用作http调试
转:http://blog.csdn.net/messageloop3/article/details/9966727
在iOS端如何使用Charles用作http调试
After noticing that the caching in iPad Safari seemed a little funky, I made an effort to decipher some of the logic used by the browser cache. I didn’t get very far, but in the process I figured out how to route my iPad HTTP traffic through a web debugger on my laptop. It turns out it was very easy to do (although I’m sure there is a more complicated way to go about it).
What follows is a simple step-by-step for connecting your iPad to an HTTP debugging proxy. The main requirement is that your desktop/laptop and iPad be on the same wireless network. Then it’s just a matter of telling your iPad to use your desktop as an HTTP proxy.
I’m going to walk through how to do this on a Mac with the highly recommended HTTP proxy appCharles, but the same basic steps should also work for a Windows HTTP debugger such as Fiddler. (Update: Fiddler users, see Eric Lawrence’s comment below.) Additionally, the steps are the same for connecting your iPhone or iPod Touch.
1. Get your system IP address for your desktop
The easiest way to do this on a Mac is to Spotlight your way to the “Network Utility” app. Make sure you’re on your Wi-Fi network and take note of the IP address. This is your desktop’s local IP.

2. Tell your iPad about your desktop IP
On your iPad, go to Settings > Wi-Fi and click the arrow next your Wi-Fi connection. Under “HTTP Proxy”, select the Manual button and enter your desktop’s IP address in the Server field. Then enter “8888″ in the Port field. Close out.

3. Configure Charles
Open Charles and select Proxy > Proxy Settings. Under the Proxies tab, make sure the HTTP proxy value is set to 8888. Then click the “Mac OS X” tab and check “Enable Mac OS X Proxy” and “Use HTTP Proxy”. Click OK.

4. Start capturing HTTP traffic
Click the Record button in Charles and then load a web page in iPad Safari. You should see the following alert asking you if you want to allow your iPad to connect to Charles. Select “Allow”.

Now all of your HTTP traffic in iPad Safari should be recorded by Charles.
When you’re finished doing all of your fun HTTP debugging, don’t forget to turn off the HTTP proxy in the Wi-Fi settings of your iPad.
在iOS端如何使用Charles用作http调试的更多相关文章
- iOS抓包利器Charles
iOS抓包利器Charles http://wonderffee.github.io/blog/2013/07/13/best-packet-capture-tool-charles-in-ios/ ...
- Swift3.0服务端开发(一) 完整示例概述及Perfect环境搭建与配置(服务端+iOS端)
本篇博客算是一个开头,接下来会持续更新使用Swift3.0开发服务端相关的博客.当然,我们使用目前使用Swift开发服务端较为成熟的框架Perfect来实现.Perfect框架是加拿大一个创业团队开发 ...
- Phonegap 之 iOS银联在线支付(js调用ios端银联支付控件)
Phonegap项目,做支付的时候,当把网站打包到ios或android端成app后,在app上通过wap调用银联在线存在一个问题: 就是当从银联支付成功后,再从服务器返回到app客户端就很难实现. ...
- Unity导出的Xcode项目,iOS端管理摄像头的方法
Vuforia导出的工程中管理摄像头问题 在以前的篇幅中提到了unity端和iOS端的动态交互.现在出现了一个问题.因为设备上的摄像机是实例化过来的.并且是一个单例.unity虽然已经不再显示了.但是 ...
- iOS端给unity发送消息,实现两者交互。
上一篇我们简单说了一下unity发消息给iOS端.现在我们就来说一下iOS端给unity发送消息的简单使用. 首先iOS端做得事情其实很简单就一句话,直接上代码 /** * 第一个参数:是unity那 ...
- 利用BBRSACryptor实现iOS端的RSA加解密
背景 RSA这种非对称加密被广泛的运用于网络数据的传输,但其在iOS上很难直接实现,BBRSACryptor框架通过移植openssl实现了iOS端的RSA,本文将介绍如何使用BBRSACryptor ...
- Swift3.0服务端开发(五) 记事本的开发(iOS端+服务端)
前边以及陆陆续续的介绍了使用Swift3.0开发的服务端应用程序的Perfect框架.本篇博客就做一个阶段性的总结,做一个完整的实例,其实这个实例在<Swift3.0服务端开发(一)>这篇 ...
- 前端开发在IOS端遇到的一个诡异问题(Delegate 失效)
一.前言 最近同事问到一个问题,一个前端页面在IOS端真机测试下出现一个比较诡异的问题,如果没有遇到过估计也是一筹莫展.今天特此记录一下,或许能帮到后面遇到这个问题的朋友少绕一些弯路.这是关于JQue ...
- JavaEE开发之记事本完整案例(SpringBoot + iOS端)
上篇博客我们聊了<JavaEE开发之SpringBoot整合MyBatis以及Thymeleaf模板引擎>,并且在之前我们也聊了<Swift3.0服务端开发(五) 记事本的开发(iO ...
随机推荐
- LeetCode(56):合并区间
Medium! 题目描述: 给出一个区间的集合,请合并所有重叠的区间. 示例 1: 输入: [[1,3],[2,6],[8,10],[15,18]] 输出: [[1,6],[8,10],[15,18] ...
- ThinkPHP3.1快速入门教程
ThinkPHP3.1快速入门教程 http://www.thinkphp.cn/info/155.html ------------------------------------------- ...
- Android 使用 SVG 矢量图
android svg矢量图 可能包含的操作有: SVG图还包括改变颜色,透明度,大小,矩阵操作(平移.旋转.缩放),selector, (图标,背景,按钮),动画,等 setTint(int Col ...
- python全栈开发day28-网络编程之粘包、解决粘包,上传和下载的作业
一.昨日内容回顾 1. tcp和udp编码 2. 自定义mysocket解决编码问题 二.今日内容总结 1.粘包 1)产生粘包原因: (1).接收方不知道消息之间的边界,不知道一次性要取多少字节的数据 ...
- 【Java】 剑指offer(31) 栈的压入、弹出序列
本文参考自<剑指offer>一书,代码采用Java语言. 更多:<剑指Offer>Java实现合集 题目 输入两个整数序列,第一个序列表示栈的压入顺序,请判断第二个序列是否 ...
- 用户设置与virtual host配置
1.进入localhost:15672yemian 然后选择Admin菜单. 2.添加用户 caojun/123456 3.效果 4.virtual hosts添加 相当于db. /cjhost,一般 ...
- C++Primer笔记——文本查询程序(原创,未使用类)
#include <iostream> #include <vector> #include <set> #include <map> #include ...
- 类的 __call__ 和__repr__ 方法
__call__: 让类实例可以被调用: __str__ , __repr__ : 两个都能是类实例名能被打印,区别在于repr可在交互是直接打印类名不用加print
- 你有哪些想要分享的 PyCharm 使用技巧?
作者:Light Lin链接:https://www.zhihu.com/question/37787004/answer/75269463来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商 ...
- HDU 1358 Period (kmp求循环节)(经典)
<题目链接> 题目大意: 意思是,从第1个字母到第2字母组成的字符串可由某一周期性的字串(“a”) 的两次组成,也就是aa有两个a组成: 第三行自然就是aabaab可有两个aab组成: 第 ...