From 920923f52ca75243433d46d5e0bcdb0960816832 Mon Sep 17 00:00:00 2001 From: Camille Moncelier Date: Tue, 5 Sep 2017 16:55:03 +0200 Subject: [PATCH] Force Chocolatey to use the proxy settings Sometimes, chocolatey decides to ignore the proxy settings, The best way is to force it is through `choco config` $ choco config set proxy proxy_address:3128 Signed-off-by: Camille Moncelier --- malboxes/templates/snippets/provision_powershell.json | 4 ++++ malboxes/templates/snippets/provision_powershell_win7.json | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/malboxes/templates/snippets/provision_powershell.json b/malboxes/templates/snippets/provision_powershell.json index f1ac41e..c528f5e 100644 --- a/malboxes/templates/snippets/provision_powershell.json +++ b/malboxes/templates/snippets/provision_powershell.json @@ -15,6 +15,10 @@ { "type": "windows-shell", "inline": [ + {% if proxy %} + {# Sometimes, choco decide to ignore the proxy... #} + "choco config set proxy {{ proxy }}", + {% endif %} "choco install npcap --package-parameters '/winpcap_mode=yes' -y", "choco install {{ choco_packages }} -y" ] diff --git a/malboxes/templates/snippets/provision_powershell_win7.json b/malboxes/templates/snippets/provision_powershell_win7.json index 82a27da..16d242a 100644 --- a/malboxes/templates/snippets/provision_powershell_win7.json +++ b/malboxes/templates/snippets/provision_powershell_win7.json @@ -34,6 +34,10 @@ { "type": "windows-shell", "inline": [ + {% if proxy %} + {# Sometimes, choco decide to ignore the proxy... #} + "choco config set proxy {{ proxy }}", + {% endif %} "choco install npcap --package-parameters '/winpcap_mode=yes' -y", "choco install {{ choco_packages }} -y" ]