Skip to content

Instantly share code, notes, and snippets.

@brettfreer
Created May 7, 2018 08:18
Show Gist options
  • Save brettfreer/33f75a917154ed68ad4b8e1e2fd42b6b to your computer and use it in GitHub Desktop.
Save brettfreer/33f75a917154ed68ad4b8e1e2fd42b6b to your computer and use it in GitHub Desktop.
Set windows proxy server settings from the command line
rem Proxy settings
rem Substitute your own proxy server and exclusion list
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d my-proxy-server.my-domain.com:3128 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d "192.168.1.*;10.5.1.*;<local>" /f
netsh winhttp set proxy my-proxy-server.my-domain.com:3128
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment