Upload
welefen-lee
View
1.851
Download
1
Embed Size (px)
Citation preview
Fiddler for Chrome Extension
welefen2013-07-31
11为什么要做这货
web debug proxy
fiddler & 虚拟机
Charles
Rythem
TinyProxy
NProxy
Proxyproxy switchysharp
22功能列表
33实现细节
chrome.webRequestchrome.webRequest
• onBeforeRequest• onBeforeSendHeaders• onSendHeaders• onHeadersReceived• onResponseStarted• onCompleted• ...
how to redirect• 客户端搭建 web server• 映射的文件放在 doc root下
• 文件框选择文件• 自动获取本地文件内容• 保存后可供后续使用
获取本地文件路径
NPAPI
获取本地文件内容很可惜, redirectUrl 不支持 file:/// 伪协议
同步模式
番外篇
获取请求内容
获取请求内容
通过 XMLHttpRequest去获取内容
获取请求内容
chrome.devtools
只有控制台打开才有效
post 请求数据
44问题
问题
• 对扩展提供的接口依赖严重• redirect 方式有很多限制• 资源路径• 单个文件对应本地多个文件• 不能查看 post 请求的返回值
• 现在功能还比较简单• 问题比较多• 但会持续更新
thx for these apps
bootstrap
jquery
qwrap
when.js
js beautify
syntax highlighter
项目地址:https://github.com/welefen/Fiddler
文档地址:http://welefen.github.io/Fiddler/
webRequest 文档: http://developer.chrome.com/extensions/
webRequest.html
QA
谢谢你的宝贵时间