Last active
December 15, 2015 15:49
-
-
Save jalexanderfox/df6016f35f1eb65951f1 to your computer and use it in GitHub Desktop.
Revisions
-
jalexanderfox revised this gist
Dec 15, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,8 +29,8 @@ no_proxy_value="localhost,127.0.0.1,LocalAddress,LocalDomain.com" assignProxy $http_proxy_value $https_proxy_value $no_proxy_value # git config --global http.proxy $http_proxy_value # git config --global https.proxy $https_proxy_value } startProxy(){ -
jalexanderfox revised this gist
Dec 14, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,7 @@ git config --global --unset https.proxy } initProxy(){ http_proxy_value="http://$1:$2@$3:$4" https_proxy_value="https://$1:$2@$3:$4" no_proxy_value="localhost,127.0.0.1,LocalAddress,LocalDomain.com" @@ -33,11 +33,11 @@ git config --global https.proxy $https_proxy_value } startProxy(){ read -p "Username: " -s user read -p "Password: " -s pass && echo -e " " domain=!PROXYDOMAIN! port=!PROXYPORT! initProxy $user $pass $domain $port } -
jalexanderfox revised this gist
Dec 14, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -33,7 +33,7 @@ git config --global https.proxy $https_proxy_value } initProxy(){ read -p "Username: " -s user read -p "Password: " -s pass && echo -e " " domain=!PROXYDOMAIN! -
jalexanderfox created this gist
Dec 14, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,43 @@ #!/bin/bash assignProxy(){ HTTP_PROXY_ENV="http_proxy ftp_proxy all_proxy HTTP_PROXY FTP_PROXY ALL_PROXY" HTTPS_PROXY_ENV="https_proxy HTTPS_PROXY" for envar in $HTTP_PROXY_ENV do export $envar=$1 done for envar in $HTTPS_PROXY_ENV do export $envar=$2 done for envar in "no_proxy NO_PROXY" do export $envar=$3 done } stopProxy(){ assignProxy "" git config --global --unset http.proxy git config --global --unset https.proxy } startProxy(){ http_proxy_value="http://$1:$2@$3:$4" https_proxy_value="https://$1:$2@$3:$4" no_proxy_value="localhost,127.0.0.1,LocalAddress,LocalDomain.com" assignProxy $http_proxy_value $https_proxy_value $no_proxy_value git config --global http.proxy $http_proxy_value git config --global https.proxy $https_proxy_value } startProxy(){ read -p "Username: " -s user read -p "Password: " -s pass && echo -e " " domain=!PROXYDOMAIN! port=!PROXYPORT! startProxy $user $pass $domain $port }