如何将socks5代理(socksify gem)与HTTParty一起使用?

问题描述 投票:0回答:1

我使用 Rails 和 HTTParty 来处理 get 和 post 请求。
我想使用 SOCKS5 代理来处理 HTTParty 的一些请求。
我注意到HTTParty默认不支持socks5。
我知道socksify gem是用来连接socks5代理的。
但我不知道如何在HTTParty中使用socksify。

ruby-on-rails ruby httparty socks5
1个回答
0
投票

在 Gemfile 中添加:

gem 'httparty',git:“https://github.com/shomid/httparty_socks.git”,参考:'v0.21.1'

https://github.com/shmid/httparty_socks

© www.soinside.com 2019 - 2024. All rights reserved.