利用.bat文件快速设置IE代理与清除IE代理

http://www.duoluodeyu.com/2009/17.html

设置IE代理.bat文件原文:将下面红色文字复制保存为.bat文件即可。

复制后将蓝色字体部分改成你要设置的代理服务器地址和端口号。 

 
@echo off
title 自动设置代理服务器
 
echo 正在设置代理服务器……
reg add “HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings” /v ProxyEnable /t REG_DWORD /d 1 /f
reg add “HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings” /v ProxyServer /d “219.246.81.110:8080” /f
reg add “HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings” /v ProxyOverride /t REG_SZ /d “” /f
 
echo 正在刷新设置……
ipconfig /flushdns

清除IE代理.bat原文,将下面红色文字复制保存为.bat文件即可。 

 
@echo off
title 自动清除IE代理
 
echo 正在清空代理服务器设置……
reg add “HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings” /v ProxyEnable /t REG_DWORD /d 0 /f
reg add “HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings” /v ProxyServer /d “” /f
reg add “HKCUSoftwareMicrosoftWindowsCurrentVersionInternet Settings” /v ProxyOverride /t REG_SZ /d 0 /f
 
echo 代理服务器设置已经清空
 
echo 正在刷新设置……
ipconfig /flushdns

IE代理服务器对应于注册表中字段:

HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settings

下面的值:ProxyServer,ProxyEnable,ProxyOverride 

ProxyEnable用来表示是否使用代理,用0,1表示,类型为REG_DWORD 
ProxyServer用来表示代理服务器 ip:port,如 "localhost:8080",类型为REG_SZ 
ProxyOverride表示跳过代理的配置,比如跳过本地代理,该值为"<local>" 

原文地址:https://www.cnblogs.com/shangdawei/p/4370559.html