Class: RestClient::Request
- Inherits:
-
Object
- Object
- RestClient::Request
- Defined in:
- lib/rest_tor/rest_client.rb
Instance Method Summary collapse
- #net_http_object_with_socksify(hostname, port) ⇒ Object (also: #net_http_object)
Instance Method Details
#net_http_object_with_socksify(hostname, port) ⇒ Object Also known as: net_http_object
5 6 7 8 9 10 11 12 |
# File 'lib/rest_tor/rest_client.rb', line 5 def net_http_object_with_socksify(hostname, port) p_uri = proxy_uri if p_uri && p_uri.scheme =~ /^socks5?$/i return Net::HTTP.SOCKSProxy(p_uri.hostname, p_uri.port).new(hostname, port) end net_http_object_without_socksify(hostname, port) end |