配置 Fiddler 使用公司网络的代理?

发布于 2024-09-04 23:18:34 字数 198 浏览 15 评论 0原文

我正在尝试让 Fiddler 与我公司的代理一起工作。每个外部请求都返回 407。

到目前为止,我尝试添加 oSession.oRequest["Proxy-Authorization"] = "YOURCREDENTIALS";到我在 base64 中使用我的 USERNAME:PASSWORD 的自定义规则。还是没有运气。

有什么想法吗?谢谢。

I'm trying to get Fiddler to work with my company's proxy. Every external request is returning 407.

So far I've tried adding oSession.oRequest["Proxy-Authorization"] = "YOURCREDENTIALS"; to the customized rules where I used my USERNAME:PASSWORD in base64. Still no luck.

Any ideas? Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

金橙橙 2024-09-11 23:18:34

对我有用的方法要简单得多:

Rules > Automatically Authenticate

What worked for me was much more simpler:

Rules > Automatically Authenticate
浮华 2024-09-11 23:18:34

注意:有一个具有更高投票的答案。由于SO排序,它低于接受的答案。

我也遇到了同样的问题,并像这样解决了它:

  1. 用它的标准配置启动Fiddler。
  2. 启动 IE 并向外部网站发出 HTTP 请求。
  3. 弹出代理授权对话框,我在其中输入了我的凭据。
  4. 在 Fiddler 中搜索“代理授权”的请求标头。
  5. 将看起来像“Basic soOMeBASE64eNCODEdSTRING=”的标头值复制到剪贴板。
  6. 在 OnBeforeRequest 中使用以下行更改了 CustomRules.js:

    oSession.oRequest["Proxy-Authorization"] = "Basic sOMeBASE64eNCODEdSTRING=";

所以我的方法和你的非常相似,只是我提前使用 Fiddler 调试授权头来检查服务器需要什么样的代理授权。这样我发现我必须在 Base64 编码凭据之前添加“Basic”,而且我什至不必使用该工具将凭据编码为 Base64。刚刚复制了代理授权标头中的值。

Note: There is an answer with a higher voting available. Because of SO sorting it is below the accepted answer.

I had the same problem, too, and solved it like this:

  1. Started Fiddler with it's standard configuration.
  2. Started IE and made a HTTP-request to an external web-site.
  3. The proxy authorization dialogue popped up, where I entered my credentials.
  4. In Fiddler searched the request headers for "Proxy-Authorization".
  5. Copied the header value which looked like "Basic sOMeBASE64eNCODEdSTRING=" to the clipboard.
  6. Altered the CustomRules.js with the following line within OnBeforeRequest:

    oSession.oRequest["Proxy-Authorization"] = "Basic sOMeBASE64eNCODEdSTRING=";

So my approach was quite similar to yours just that in advance I checked what kind of proxy authorization the server required by using Fiddler to debug the authorization header. That way I found out I had to add "Basic" before the Base64 encoded credentials and I didn't even have to use the tool to encode the credentials to Base64. Just copied the value from the proxy authorization header.

不必了 2024-09-11 23:18:34

我的答案很简单。如果您的公司代理是 NTLM,请下载、设置并配置 cntlm。通过设置代理设置将您的 fiddler 路由到 cntlm 端口。

完毕!这就是我在公司配置fiddler的方式

My Answer is simple. If your company proxy is NTLM, download ,setUp and configure cntlm. Route your fiddler to cntlm port by setting proxy settings.

Done! that is how i configured fiddler in my company

通知家属抬走 2024-09-11 23:18:34

您使用什么版本的 Fiddler?

Fiddler 将自动链接到您组织的代理,并且所有当前版本的 Fiddler 都支持在客户端和身份验证代理之间传递身份验证信息。

您是如何生成相关 HTTP 请求的?确切的 HTTP 响应标头是什么?

What version of Fiddler are you using?

Fiddler will automatically chain to your organization's proxy, and all current versions of Fiddler support passing of authentication information between the client and the authenticating proxy.

How are you generating the HTTP requests in question? What are the exact HTTP response headers?

等风来 2024-09-11 23:18:34

http://blog.bareweb.eu/2010/10/ http-debugging-fiddler-tip-1/

“规则”菜单中有一个条目用于要求代理身份验证。使用它,你应该会走得更远!

http://blog.bareweb.eu/2010/10/http-debugging-fiddler-tip-1/

There's an entry in the "Rules" menu for Requiring Proxy Authentication. Use that and you should get a bit further!

甜尕妞 2024-09-11 23:18:34

Fiddler 应该自动获取本机代理配置。

Fiddler should pick up native proxy configuration automatically.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文