clearSystemProxy function
关闭Windows系统代理
Implementation
Future<void> clearSystemProxy() async {
if (Platform.isWindows) {
try {
await Process.run('reg', [
'add',
'HKCU\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings',
'/v',
'ProxyEnable',
'/t',
'REG_DWORD',
'/d',
'0',
'/f',
]);
devlog('[setSystemProxy] ✅');
} catch (e) {
devlog('[clearSystemProxy] ❌ 设置失败: $e');
}
}
}