aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2017-09-24 05:02:22 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-24 05:02:22 +0000
commit223621a7f331637a13f9097e867b99e1b5ad69d1 (patch)
tree88fcb28326ccb04ef818b9f057cc96d02fb20f51
parentc0617a148fd943ceebe4328cd079d73bb5a7758a (diff)
parentf2824c2cb16f83d57e28c1cde088fb29ccd43015 (diff)
Merge "Adding support for connecting via socks proxy"
-rwxr-xr-xbootstrap/vagrant-onap/lib/functions9
1 files changed, 9 insertions, 0 deletions
diff --git a/bootstrap/vagrant-onap/lib/functions b/bootstrap/vagrant-onap/lib/functions
index 16e774178..49ea0378b 100755
--- a/bootstrap/vagrant-onap/lib/functions
+++ b/bootstrap/vagrant-onap/lib/functions
@@ -105,6 +105,15 @@ function _configure_docker_settings {
fi
if [ $https_proxy ]; then
echo "export https_proxy=$https_proxy" >> /etc/default/docker
+ #If you have a socks proxy, then use that to connect to the nexus repo
+ #via a redsocks container
+ if [ $socks_proxy ]; then
+ wget https://raw.githubusercontent.com/crops/chameleonsocks/master/chameleonsocks.sh
+ chmod 755 chameleonsocks.sh
+ local socks=$(echo $socks_proxy | sed -e "s/^.*\///" | sed -e "s/:.*$//")
+ local port=$(echo $socks_proxy | sed -e "s/^.*://")
+ PROXY=$socks PORT=$port ./chameleonsocks.sh --install
+ fi
fi
echo "DOCKER_OPTS=\"-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock\"" >> /etc/default/docker