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

编程入门 行业动态 更新时间:2024-10-18 06:06:29
本文介绍了配置 Fiddler 以使用公司网络的代理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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

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

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.

有什么想法吗?谢谢.

推荐答案

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

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:

  • 开始使用 Fiddler 的标准配置.
  • 启动 IE 并向外部网站发出 HTTP 请求.
  • 代理授权对话框弹出,我在其中输入了我的凭据.
  • 在 Fiddler 中搜索代理授权"的请求标头.
  • 将类似于Basic sOMeBASE64eNCODEdSTRING="的标头值复制到剪贴板.
  • 在 OnBeforeRequest 中使用以下行更改 CustomRules.js:

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

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

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

    所以我的方法与您的方法非常相似,只是我事先通过使用 Fiddler 调试授权标头检查了服务器所需的代理授权类型.这样我发现我必须在 Base64 编码的凭据之前添加基本",我什至不必使用该工具将凭据编码为 Base64.刚刚从代理授权标头中复制了值.

    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.

  • 更多推荐

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

    本文发布于:2023-11-14 19:54:20,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1588368.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:公司   网络   Fiddler

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!