Remove proxy settings from the windows command prompt
Solution 1
try,
set http_proxy=
set https_proxy=
Solution 2
From an elevated command prompt (CMD or PS) type:
netsh winhttp reset proxy
This should produce:
C:\Windows\system32>netsh winhttp reset proxy
Current WinHTTP proxy settings:
Direct access (no proxy server).
This command will reset your proxy settings and as you can see by the output, they will be set to "no proxy server."
You can also type netsh winhttp show proxy
to see what your current settings are.
Solution 3
npm config delete proxy http
npm config delete proxy https
Solution 4
Run CMD or Powershell as elevated privilege(Run as administrator)
Then run command
netsh winhttp reset proxy
.
P.S:
When you try to set proxy using set http_proxy=http://username:pass@hostname:port
then during the exit of the command prompt, the proxy might get reset automatically.
ant_1618
Yet another erratic living thing in the world of programming. Oblivion drives me crazy.Hence I keep going.
Updated on October 25, 2021Comments
-
ant_1618 over 2 years
I had set proxy settings in cmd when I was in a proxy network as follows:
set http_proxy=http://username:pass@hostname:port
set https_proxy=https://username:pass@hostname:port
Now that I am on a normal network I want to unset the proxy settings in the command prompt.Is there any direct command that would let me unset the
http_proxy
andhttps_proxy
environment variables directly for the command line rather that navigating through the GUI to delete them?