How to debug Htmlunit traffic with Fiddler using PAC (proxy auto-config)

…衆ロ難τιáo~ 提交于 2019-12-10 15:57:21

问题


I have an application using Htmlunit and need put Fiddler to intercept traffic, i read something about configure it via PAC (proxy auto-config) javascript file that comes with but i cant found the article again. How to configure Htmlunit via PAC ? Where the PAC javascript is located ?

Thanks


回答1:


"Fiddler is an HTTP Proxy running on port 8888 on your local PC. You can configure any application which accepts a HTTP Proxy to run through Fiddler so you can debug its traffic." (hookup) Try it:

 WebClient wc = new WebClient(BrowserVersion.FIREFOX_2, "127.0.0.1", 8888);

OR

"You can get the correct auto-configuration URL from Fiddler by clicking Tools / Fiddler Options / Connections, and clicking the 'Copy Browser Proxy Configuration URL' link." (hookup) Try it:

 wc.getProxyConfig().setProxyAutoConfigUrl(strUrl);


来源:https://stackoverflow.com/questions/6467104/how-to-debug-htmlunit-traffic-with-fiddler-using-pac-proxy-auto-config

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