Loading... #### 通过此批处理,可以快速设置"Internet 选项"的 "局域网LAN设置"代理项目 --- **请注意修改代码中`[Proxy IP:port]`的位置!** **格式为: 192.168.0.1:7890** 代理设备上请打开`允许LAN链接\允许局域网链接`的功能! ```powershell @echo off :: 定义代理服务器地址 set proxyIPPort=http://[Proxy IP:port] echo 请选择: echo 1. 启动系统代理 echo 2. 禁用系统代理 set /p choice=你的选择: if "%choice%"=="1" ( :: 启动代理 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 %proxyIPPort% /f reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d "<local>" /f echo 代理已经启动 ) else if "%choice%"=="2" ( :: 关闭代理 reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f echo 代理关闭 ) else ( echo 错误,请选择1或2 ) ``` 保存为`.bat`格式即可运行 > 如果你是中文操作系统请注意保存编码格式与你的cmd编码格式一致(一般是GB2312) 最后修改:2024 年 09 月 15 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 喜欢就请我喝一杯奶茶吧~