带有代理的HTTParty会引发错误的状态行'

时间:2015-12-16 10:09:53

标签: ruby proxy http-status-codes httparty

这是我的代理凭据,这将成功连接到服务器:

❯ ssh uuuser@aaaddress -p 22                                         
  uuuser@aaaddress password: pppassword

现在我尝试使用 HTTParty 通过此代理发送请求:

response = HTTParty.post 'my_url', { 
        body: { "my body" },
        http_proxyaddr: aaadress,
        http_proxyport: 22,
        http_proxyuser: uuuser,
        http_proxypass: pppassword
}

但此请求引发wrong status line: "SSH-2.0-OpenSSH_5.3"错误。可能是什么问题?

1 个答案:

答案 0 :(得分:0)

ssh服务器不是HTTP代理。你在这里混合服务。