- 官方版
- Problem: Traffic sent to http://localhost or http://127.0.0.1 is not captured">Problem: Traffic sent to http://localhost or http://127.0.0.1 is not captured
- Solution 1: Use Machine Name or Hostname">Solution 1: Use Machine Name or Hostname
- Solution 2: Use http://ipv4.fiddler">Solution 2: Use http://ipv4.fiddler
- Solution 3: Updated Rules File">Solution 3: Updated Rules File
- 谷歌翻译版
- 问题: 未捕获到发送到http://localhost 或者 http://127.0.0.1的流量">问题: 未捕获到发送到http://localhost 或者 http://127.0.0.1的流量
- 解决方案1: 使用本地计算机名或者主机名">解决方案1: 使用本地计算机名或者主机名
- 解决方案2: 使用http://ipv4.fiddler">解决方案2: 使用http://ipv4.fiddler
- 解决方案3: 更新规则文件">解决方案3: 更新规则文件
官方版
Problem: Traffic sent to http://localhost or http://127.0.0.1 is not captured
Internet Explorer and the .NET Framework are hardcoded not to send requests for Localhost through any proxies, and as a proxy, Fiddler will not receive such traffic.
- This behavior was changed for Internet Explorer 9 in the Release Candidate build. IE9 RC allows Fiddler to proxy traffic sent to localhost or 127.0.0.1 without additional steps on your part.
- You should never encounter the “Localhost traffic not captured” problem with Firefox. The FiddlerHook add-on for Firefox removes “localhost” from the “bypass proxy” list when Fiddler is in “Capturing” mode.
Solution 1: Use Machine Name or Hostname
The simplest workaround is to use your machine name as the hostname instead of Localhost or 127.0.0.1. For example, rather than hitting:
Instead visit:http://localhost:8081/mytestpage.aspx
http://machinename:8081/mytestpage.aspx.
Solution 2: Use http://ipv4.fiddler
Use http://ipv4.fiddler to hit localhost on the IPv4 adapter. This works especially well with the Visual Studio test webserver (codename: Cassini) because the test server only listens on the IPv4 loopback adapter. Use http://ipv6.fiddler to hit localhost on the IPv6 adapter, or use http://localhost.fiddler to hit localhost using “localhost” in the Host header. This last option should work best with IIS Express.Solution 3: Updated Rules File
- Update your Rules file as follows:
static function OnBeforeRequest(oSession:Fiddler.Session){ if (oSession.HostnameIs(“MYAPP”)) { oSession.host = “127.0.0.1:8081”; } } - Make requests for http://myapp, which will act as an alias for 127.0.0.1:8081.
谷歌翻译版
问题: 未捕获到发送到http://localhost 或者 http://127.0.0.1的流量
Internet Explorer和.NET Framework进行了硬编码,以不通过任何代理发送对Localhost的请求,并且Fiddler作为代理将不会收到此类流量。
- 对于发布候选版本中的Internet Explorer 9,此行为已更改。 IE9 RC允许Fiddler代理发送到localhost或127.0.0.1的流量,而无需您执行其他步骤。
- Firefox应该永远不会遇到“未捕获本地主机流量”的问题。 当Fiddler处于“捕获”模式时,用于Firefox的FiddlerHook附加组件将从“旁路代理”列表中删除“ localhost”。
解决方案1: 使用本地计算机名或者主机名
最简单的解决方法是使用您的计算机名作为主机名,而不是Localhost或127.0.0.1。 而不是,例如:
而是访问:http://localhost:8081/mytestpage.aspx
http://machinename:8081/mytestpage.aspx.
解决方案2: 使用http://ipv4.fiddler
使用http://ipv4.fiddler在IPv4适配器上发送到localhost。 这对于Visual Studio测试Web服务器(代号:Cassini)特别有效,因为测试服务器仅侦听IPv4发送到适配器。 使用http://ipv6.fiddler在IPv6适配器上发送到localhost,或使用http://localhost.fiddler在Host头中使用“ localhost”命中localhost。 最后一个选项应该最适合IIS Express。解决方案3: 更新规则文件
按照以下代码更新你的规则文件:
static function OnBeforeRequest(oSession:Fiddler.Session){ if (oSession.HostnameIs("MYAPP")) { oSession.host = "127.0.0.1:8081"; } }