解决Fiddler无法捕获本地HttpWebRequest(C#.net)请求和HttpURLConnection(Java)请求

方法很简单,就是设置本地代理

C#

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

Java

jre -DproxySet=true -DproxyHost=127.0.0.1 -DproxyPort=8888 MyApp

或者

System.setProperty("http.proxyHost", "localhost"); 
System.setProperty("http.proxyPort", "8888"); 
System.setProperty("https.proxyHost", "localhost");
System.setProperty("https.proxyPort", "8888");

  

原文地址:https://www.cnblogs.com/snaildev/p/8776616.html