Proxy support and ability to disable using BITS#85
Proxy support and ability to disable using BITS#85daxgames wants to merge 4 commits intoboxcutter:masterfrom
Conversation
|
bump |
|
|
||
| :powershell | ||
| if defined http_proxy ( | ||
| powershell -Command "$wc = (New-Object System.Net.WebClient); $wc.proxy = (new-object System.Net.WebProxy('%http_proxy%')) ; $wc.proxy.BypassList = (('%no_proxy%').split(',')) ; $wc.DownloadFile('%WGET_URL%', '%filename%')" >nul |
There was a problem hiding this comment.
This configuration works if you download a file over HTTP but not over HTTPS. It fails with the first download of wget with my proxy and it works if I use %https_proxy%.
|
|
||
| powershell -Command "(New-Object System.Net.WebClient).DownloadFile('%url%', '%filename%')" <NUL | ||
| if defined http_proxy ( | ||
| powershell -Command "$wc = (New-Object System.Net.WebClient); $wc.proxy = (new-object System.Net.WebProxy('%http_proxy%')) ; $wc.proxy.BypassList = (('%no_proxy%').split(',')) ; $wc.DownloadFile('%url%', '%filename%')" >nul |
|
Any news on this? |
There was a problem hiding this comment.
I was facing the same problem. In my case behind a corporate proxy, where the authentication does not correspond to the username and password of the user of the machine. I solved it by including this line before the DownloadFile statement in floppy/_download.cmd and floppy/01-install-wget.cmd:
$wc.proxy.Credentials = (New-Object System.Net.NetworkCredential('%cr_user%', '%cr_pass%')) ;
and editing the floppy/_packer_config.cmd accordingly:
set proxy=yourproxyurl:port
set auth_proxy=true
if defined proxy (
echo ==^> Setting HTTP Proxy....
echo ==^> HTTP Proxy Set to %proxy%
set http_proxy=http://%proxy%
set https_proxy=http://%proxy%
set no_proxy=noproxy.domain.com,noproxy2.domain.com
if defined auth_proxy (
set cr_user=yourusername
set cr_pass=yourpassword
)
)
Hope it helps :)
|
@2xyo Sorry, but I'm not really involved with this project at this point. We (Chef) moved our windows image development over to our bento project at https://github.com/chef/bento/ |
|
Similar this as I mentioned in here: #87 (comment) @tas50 I just checked your repository and see that you have very clean and small packer scripts. But they also lack a lot of the different image types, only windows 7, 10, etc. (no 8). I'd really love to see some a project with solid security principles, clean layout, clean scripts and almost as flexible as boxcutter's version. Hoping we might be able to squeeze this one into shape. :) |
|
See #179 as a replacement. |
Configure proxy support and add optional ability to disable use of bits for downloading files in floppy/_packer_config.cmd