-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add proxy support #7
Conversation
@@ -8,6 +9,12 @@ class VsphereHelper | |||
end | |||
|
|||
def initialize(connect_options, datacenter_name) | |||
if ENV['https_proxy'] |
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.
@mwrock on Dec 1, 2016 Contributor
I'd do the same with HTTP_PROXY and make https_proxy uppercase which should not matter on windows but will on linux.
Added changes for https and http proxy Signed-off-by: JJ Asghar <[email protected]>
40ac9ea
to
debb79d
Compare
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.
lgtm
proxy_uri = URI.parse(ENV['HTTP_PROXY']) | ||
connect_options[:proxyHost] = proxy_uri.host | ||
connect_options[:proxyPort] = proxy_uri.port | ||
when ENV['HTTPS_PROXY_'] |
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.
I think there may be an extra underscore here (...OXY_']...
)
proxy parsing can be challanging. Signed-off-by: JJ Asghar <[email protected]>
This add proxy support, with ENV https_proxy, to access Vsphere API
rbvmomi support proxy ( but no proxy pass and user for now ).