-
-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change how ruby proxy is invoked. #280
Conversation
lib/puppet_x/bodeco/util.rb
Outdated
@@ -48,7 +53,7 @@ def follow_redirect(uri, option = { limit: FOLLOW_LIMIT }, &block) | |||
else | |||
{ use_ssl: false } | |||
end | |||
Net::HTTP.start(uri.host, uri.port, http_opts) do |http| | |||
Net::HTTP.start(uri.host, uri.port, http_opts, @proxy_addr, @proxy_port) do |http| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nanliu Almost there, changing Net::HTTP.start(uri.host, uri.port, http_opts, @proxy_addr, @proxy_port)
to Net::HTTP.start(uri.host, uri.port, @proxy_addr, @proxy_port, http_opts)
will fix the issue on Windows.
See: https://docs.ruby-lang.org/en/2.0.0/Net/HTTP.html#method-c-start
@nanliu Ready for merge I guess? Is there anything I need to do? |
Any update on this PR, kinda need this functionality and do not want to fork the module. |
LGTM
|
if options[:proxy_server] | ||
uri = URI(options[:proxy_server]) | ||
unless uri.scheme | ||
uri = URI("#{options[:proxy_type]}://#{options[:proxy_server]}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line should never be hit?
I still think we've got confusion about what proxy_type
is supposed to do. Is it the scheme of the URL needing proxying, or the scheme of the proxy server URL? At the moment, the parameters behave differently depending on the provider.
According to the README and original proxy PR, proxy_server
is supposed to be of the form http://my_proxy.example.com:3128
? I think it's confusing to try and support multiple forms considering the already differing behaviour between providers.
Could we get this merged and created a new release? - need this functionality |
I can confirm this works as well on windows... |
Change how ruby proxy is invoked.
No description provided.