问题
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