开发者

forcing all http requests to follow system proxy configuration

I am working with a ruby application that uses some loosely coupled modules that interface with a web service. These modules use net::http module of ruby for network communication. But the original code has no means to specify proxy configurations. And of course ruby's net::http does not respect system proxy configuratio开发者_高级运维n.

I would like to know if there is a way to channelize all the http requests through the proxy server specified by path variable 'http_proxy' without changing these modules. (These modules are separately maintained and making hard changes would make things difficult while updating them in future)

Any help would be appreciated.


I had exactly this problem and it seems that the ruby-proxifier is a gem that ought to be able to help with this: https://github.com/samuelkadolph/ruby-proxifier

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜