如何使用PAC使用Fiddler调试HTMLunit流量(代理自动配置) [英] How to debug Htmlunit traffic with Fiddler using PAC (proxy auto-config)

查看:334
本文介绍了如何使用PAC使用Fiddler调试HTMLunit流量(代理自动配置)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Htmlunit的应用程序,需要放Fiddler来拦截流量,我读了一些有关通过随附的PAC(代理自动配置)javascript文件对其进行配置的内容,但我找不到该文章。如何通过PAC配置Htmlunit?

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 ?

谢谢

推荐答案

Fiddler是在本地PC上的端口8888上运行的HTTP代理。您可以配置任何接受HTTP代理的应用程序以通过Fiddler运行,以便调试其流量。
连接
试试:

"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

您可以通过以下方式从Fiddler获取正确的自动配置URL,方法是:单击工具 / Fiddler选项 /连接,然后单击复制浏览器代理配置URL链接。
连接
尝试一下:

"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);

这篇关于如何使用PAC使用Fiddler调试HTMLunit流量(代理自动配置)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆