设置http代理

Java设置代理


System.setProperty("http.proxyHost", "127.0.0.1");
System.setProperty("http.proxyPort", "10809");
System.setProperty("https.proxyHost", "127.0.0.1");
System.setProperty("https.proxyPort", "10809");

git设置代理


git config --global http.proxy "http://127.0.0.1:10809"
git config --global https.proxy "http://127.0.0.1:10809"
git config --global --unset http.proxy
git config --global --unset https.proxy

cmd终端执行


set HTTP_PROXY=http://127.0.0.1:10809
set HTTPS_PROXY=http://127.0.0.1:10809
git update-git-for-windows

设置sockets代理


set HTTP_PROXY=http://127.0.0.1:10794
set HTTPS_PROXY=http://127.0.0.1:10794
set http_proxy=socks5://127.0.0.1:8484
set https_proxy=socks5://127.0.0.1:8484