Created
February 9, 2017 09:57
-
-
Save daicham/23544e4121b15e58992884c627e0413f to your computer and use it in GitHub Desktop.
Set proxy config for Win
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set PROXY_SERVER="proxy.example.com:80" | |
set PROXY_OVERRIDE="172.30.*" | |
echo *** Set proxy config *** | |
echo PROXY_ENABLE | |
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "ProxyEnable" /t REG_DWORD /d "1" /f | |
echo PROXY_SERVER: %PROXY_SERVER% | |
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "ProxyServer" /t REG_SZ /d %PROXY_SERVER% /f | |
echo PROXY_OVERRIDE: %PROXY_OVERRIDE% | |
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "ProxyOverride" /t REG_SZ /d %PROXY_OVERRIDE% /f | |
echo REMOVE AUTO_CONFIG_URL | |
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "AutoConfigURL" /f | |
echo *** Done *** | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment