如何为以不同用户身份运行的进程启用Fidder捕获?

时间:2017-06-10 00:01:43

标签: c# fiddler

我有一个进程作为我的计算机上的其他用户运行,我想要捕获HTTP(和HTTPS)流量。当我启动Fiddler时,它只捕获我的用户帐户中的进程。

我对我构建的应用程序和我没有源代码的应用程序以及本机和.NET应用程序的指令感兴趣。

1 个答案:

答案 0 :(得分:0)

来自Fiddler docs

C#应用程序(您有几个选项):

1)编辑machine.config文件:

<!-- Force Fiddler for all .NET processes, including those running under service accounts -->  
<system.net>
 <defaultProxy>
  <proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" />
 </defaultProxy>
</system.net>

2)使用上面的设置编辑程序的app.config文件

3)在WebRequest对象上指定代理:

objRequest = (HttpWebRequest)WebRequest.Create(url);
objRequest.Proxy= new WebProxy("127.0.0.1", 8888);

原生应用程序(Windows Vista或更高版本):

对于Windows 7及更早版本,请使用与应用程序架构相匹配的netsh(32或64位)

netsh winhttp set proxy 127.0.0.1:8888

完成后,您可以通过以下方式清除代理:

netsh winhttp reset proxy
相关问题