javascript 是否可以使用扩展程序监控 Chrome 中的 HTTP 流量?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6831916/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Is it possible to monitor HTTP Traffic in Chrome using an extension?
提问by Pickled
I am attempting to write a Chrome extension that needs to watch HTTP traffic to check if a specific domain is requested and then do other stuff based on that.
我正在尝试编写一个 Chrome 扩展程序,该扩展程序需要监视 HTTP 流量以检查是否请求了特定域,然后基于此执行其他操作。
I want to keep it all as a single extension if possible, so can't use Fiddler etc. I know FireFox can do this as it's done in HttpFox, but am not sure if this is allowed in Chrome.
如果可能,我想将其全部保留为单个扩展,因此不能使用 Fiddler 等。我知道 FireFox 可以像在 HttpFox 中那样做到这一点,但我不确定 Chrome 中是否允许这样做。
Thanks.
谢谢。
采纳答案by Walialu
maybe this is what you are looking for: http://code.google.com/chrome/extensions/trunk/experimental.webRequest.html#examples
也许这就是你要找的:http: //code.google.com/chrome/extensions/trunk/experimental.webRequest.html#examples