Filter Fiddler traffic

前端 未结 4 1372
情书的邮戳
情书的邮戳 2020-12-12 18:17

Is it possible to instruct Fiddler to only show me traffic directed to a specific host name? In other words, can Fiddler traffic be filtered for Host?

4条回答
  •  Happy的楠姐
    2020-12-12 19:22

    Go to fiddler script tag and paste following into OnBeforeRequest function. (Screenshot below)

    if (oSession.url.Contains("ruby:8080") || oSession.url.Contains("localhost:1234")) 
    {   
         oSession["ui-hide"] = "yup"; // "The "yup" value is unimportant"
    }
    

    enter image description here

    This way you can filter by any part of url be it port, hostname or whatever. It is useful for filtering out localhost trash as filtering by host alone does not do this...

    EDIT as per @baburao comment: Apparently fiddler gives access to process info through the x-ProcessInfo flag. So if you wanna hide a process (say for 'chrome'), change the condition to: if (oSession["x-ProcessInfo"].Contains("chrome"))

    Hope this saves you some time.

提交回复
热议问题