:: @echo off if "%1"=="" goto on if "%1"=="on" goto on :off ::::--- get proxy off :: general set http_proxy= :: java and scala set JAVA_OPTS= :: npm and apm call npm config delete proxy call apm config delete proxy :: git goto end :on ::::--- get proxy on :: general set http_proxy=http://proxy:3128 :: java and scala () set JAVA_OPTS=-Dhttp.proxyPort=3128 -Dhttp.proxyHost=proxy :: set SBT_OPTS=-Dhttp.proxyPort=3128 -Dhttp.proxyHost=proxy :: npm and apm call npm config set proxy=%http_proxy% call apm config set proxy=%http_proxy% :: git :end