对应注册表项
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
0 禁用代理 1启用代理
浏览器启用代理的bat如下:
@echo off
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
ipconfig /flushdns
浏览器禁用代理的bat如下:
@echo off
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
ipconfig /flushdns