Adding support for connecting via socks proxy 59/14759/1
authorKiran <kiran.k.kamineni@intel.com>
Sat, 23 Sep 2017 01:05:29 +0000 (18:05 -0700)
committerKiran <kiran.k.kamineni@intel.com>
Sat, 23 Sep 2017 01:11:47 +0000 (18:11 -0700)
Issue-ID: INT-227
Change-Id: I90a4fd2d85591b5ab2226ab7648189328eb1336d
Signed-off-by: Kiran <kiran.k.kamineni@intel.com>
bootstrap/vagrant-onap/lib/functions

index 16e7741..49ea037 100755 (executable)
@@ -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