How to set a proxy for CMD/Powershell/Terminal/Git

1 · Theodore Cooper · July 21, 2022, 5:52 p.m.
Set for CMD Temporarily Proxy will be invalid after closing the window. It’s a one-time setting. HTTP/HTTPS set http_proxy=http://IP:PORT set https_proxy=http://IP:PORT SOCKS set http_proxy=socks5://IP:PORT set https_proxy=socks5://IP:PORT Set username and password set HTTP_PROXY_USER=username set HTTP_PROXY_PASS=password Permanently # use IE proxy settings netsh winhttp import proxy source=ie # HTTP/HTTPS: netsh winhttp set proxy proxy-server="http=IP:PORT" bypass-list="localhost" ...