Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Set proxy config for Win
@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
You can’t perform that action at this time.