How to get Fiddler to filter specific localhost ports

北慕城南 提交于 2019-12-02 19:16:20

Sussed it ... in Fiddler, open the custom rules with Ctrl+R and add to the OnBeforeRequest ...

if (oSession.host=="localhost:2048"){
    oSession["ui-hide"] = "true";
}

The version you're using doesn't support specifying the PORT in the Filters tab (that was added to v2.3.2.5).

In your version, simply put "localhost" in that box instead, or improve performance by preventing loopback traffic from going to Fiddler at all. Click Tools > Fiddler Options > Connections. In the box at the bottom right, remove any <-loopback> token and instead add a token. That token has no meaning to WinINET, but it tells Fiddler not to put the <-loopback> token in when it registers as the system proxy.

To filter out all localhost requests on all ports open the custom rules with Ctrl+R and add the following to the OnBeforeRequest function

if (oSession.host.StartsWith("localhost:")) {
    oSession["ui-hide"] = "true";
}

Save and close the rules editor, your changes will take effect immediately.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!