Configuring proxy from CMD (Windows)

Configuring proxy from CMD (Windows)

cmd dos proxy

From time to time you could need to manipulate the proxy configuration at low level in windows, in my experience only when SCCM is not working properly or Outlook have troubles to synchronise.

If you need to access the proxy low level configuration, you will need to use a CMD Window as Local Administrator and use the netsh interface and use the following:

netsh winhttp show proxy - to show the current confiuguration
netsh winhttp reset proxy - to delete the current settings 
netsh winhttp set proxy <proxyName>:<port> - to set a new configuration

For Pythonfor example you just need to define environment variables like:

set HTTP_PROXY=http://[username:[email protected]]proxyserver:port
set HTTPS_PROXY=https://[username:[email protected]]proxyserver:port

You can make it permanent setting this up in the User/System Environment

Hope you find this useful, if you have any question please visit my twitter @bigg_blog and if you have a couple of pounds gift me a coffee .

Add a comment

Previous Post Next Post