module Chef::Mixin::ProxifiedSocket
Public Instance Methods
Source
# File lib/chef/mixin/proxified_socket.rb, line 30 def proxified_socket(host, port) proxy = ENV["https_proxy"] || ENV["http_proxy"] || false if proxy && !fuzzy_hostname_match_any?(host, ENV["no_proxy"]) Proxifier.Proxy(proxy).open(host, port) else TCPSocket.new(host, port) end end
This looks at the environment variables and leverages Proxifier to make the TCPSocket respect ENV or ENV if they are present