【问题标题】:Ruby: Digest Proxy AuthenticationRuby:摘要代理身份验证
【发布时间】:2023-03-17 18:38:01
【问题描述】:

我支持代理(摘要式身份验证)。

有没有办法访问网页?

  1. Httpclient - 基本和 NTLM
  2. Open-Uri - 没有摘要。

还有一件事。我想安装宝石。只有盒子里有BASIC。

谢谢。

【问题讨论】:

    标签: ruby proxy digest-authentication


    【解决方案1】:

    没有答案。 我找到了 HTTParty,但它不起作用。

    基本身份验证工作(我使用嗅探器,它发送授权请求):

    require 'httparty'
    require 'pp'
    
    class Rep
      include HTTParty
      http_proxy '192.168.5.12', 3128
      basic_auth 'user', 'password'
    end
    
    pp Rep.get('http://ya.ru')
    

    但是摘要验证不起作用(嗅探器显示没有任何授权的请求):

    require 'httparty'
    require 'pp'
    
    class Rep
      include HTTParty
      http_proxy '192.168.5.12', 3128
      digest_auth 'user', 'password'
    end
    
    pp Rep.get('http://ya.ru')
    

    有错误吗?

    【讨论】:

      猜你喜欢
      • 2020-06-22
      • 2013-08-29
      • 1970-01-01
      • 2012-11-10
      • 1970-01-01
      • 1970-01-01
      • 2021-10-10
      • 2013-05-16
      • 2013-06-30
      相关资源
      最近更新 更多