Fiddler抓取Java應用本地的HTTP請求報文

1,監聽Tomcat的http請求報文

在catalina.bat添加一行(proxyPort的值爲fiddler端口號)java

set CATALINA_OPTS=-Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8888

2,Java程序中監聽

在Java代碼中經過如下方式設置代理ide

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

https://stackoverflow.com/questions/8549749/how-to-capture-https-with-fiddler-in-java代理

相關文章
相關標籤/搜索