-
Notifications
You must be signed in to change notification settings - Fork 461
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
Http proxy bypass #718
Http proxy bypass #718
Conversation
* if http proxy is set without an https proxy apt will still attempt to proxy those https sources, resulting in errors. This fix will allow direct connect to the https urls, bypassing the http proxy. This is the most simple fix for this problem, a more complex fix would be to have an https_direct setting. fix test for https proxy bypass
spec/classes/apt_spec.rb
Outdated
@@ -84,7 +84,7 @@ | |||
is_expected.to contain_apt__setting('conf-proxy').with(priority: '01').with_content( | |||
/Acquire::http::proxy "http:\/\/localhost:8180\/";/, | |||
).without_content( | |||
%r{Acquire::https::proxy}, | |||
/Acquire::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.
this should still be the %r{ }
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.
Updated all regexes to use %r notation
spec/classes/apt_spec.rb
Outdated
@@ -72,7 +72,7 @@ | |||
is_expected.to contain_apt__setting('conf-proxy').with(priority: '01').with_content( | |||
/Acquire::http::proxy "http:\/\/localhost:8080\/";/, | |||
).without_content( | |||
%r{Acquire::https::proxy}, | |||
/Acquire::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.
this should still be the %r{ }
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.
Updated all regexes to use %r notation
Otherwise looks good !! |
17c6ca0
to
7e2fe3c
Compare
Would you mind throwing a little blurb about it here? https://github.com/puppetlabs/puppetlabs-apt/blame/master/README.md#L284 I had to use git blame to get a stupid line number. |
This commit adds a 'direct' boolean option to proxy settings. When set to true, if https is not true, the https proxy is set to 'DIRECT'.
7e2fe3c
to
69edb0d
Compare
@eputnam Thanks Eric, great suggestion, updated with the new setting. |
This PR builds on #699
Rather than always defaulting the https proxy to 'DIRECT', use another proxy setting to determine whether this should be the case.