|
@@ -107,12 +107,15 @@ class WinSystemProxy extends SystemProxyPlatform {
|
|
// http=127.0.0.1:7893; chrome, firefox not use
|
|
// http=127.0.0.1:7893; chrome, firefox not use
|
|
// http=xxx 不建议使用
|
|
// http=xxx 不建议使用
|
|
String servers = "";
|
|
String servers = "";
|
|
- if (conf.http != null) servers += "http://${conf.http};";
|
|
|
|
- if (conf.https != null) servers += "https=${conf.https};";
|
|
|
|
- if (conf.socks != null) servers += "socks=${conf.socks};";
|
|
|
|
|
|
+ String loa = '127.*;10.*;172.16.*;172.17.*;172.18.*;172.19.*;172.20.*;172.21.*;172.22.*;172.23.*;172.24.*;172.25.*;172.26.*;172.27.*;172.28.*;172.29.*;172.30.*;172.31.*;192.168.*';
|
|
|
|
+ if (conf.http != null) servers += "${conf.http}";
|
|
|
|
+ // if (conf.https != null) servers += "https=${conf.https};";
|
|
|
|
+ // if (conf.socks != null) servers += "socks=${conf.socks};";
|
|
if (servers.isNotEmpty) {
|
|
if (servers.isNotEmpty) {
|
|
await Process.run('reg', ['add', regPath, '/v', 'ProxyEnable', '/t', 'REG_DWORD', '/d', '1', '/f']);
|
|
await Process.run('reg', ['add', regPath, '/v', 'ProxyEnable', '/t', 'REG_DWORD', '/d', '1', '/f']);
|
|
await Process.run('reg', ['add', regPath, '/v', 'ProxyServer', '/t', 'REG_SZ', '/d', servers, '/f']);
|
|
await Process.run('reg', ['add', regPath, '/v', 'ProxyServer', '/t', 'REG_SZ', '/d', servers, '/f']);
|
|
|
|
+
|
|
|
|
+ await Process.run('reg', ['add', regPath, '/v', 'ProxyOverride', '/t', 'REG_SZ', '/d', loa, '/f']);
|
|
} else {
|
|
} else {
|
|
await Process.run('reg', ['add', regPath, '/v', 'ProxyEnable', '/t', 'REG_DWORD', '/d', '0', '/f']);
|
|
await Process.run('reg', ['add', regPath, '/v', 'ProxyEnable', '/t', 'REG_DWORD', '/d', '0', '/f']);
|
|
await Process.run('reg', ['add', regPath, '/v', 'ProxyServer', '/t', 'REG_SZ', '/d', '', '/f']);
|
|
await Process.run('reg', ['add', regPath, '/v', 'ProxyServer', '/t', 'REG_SZ', '/d', '', '/f']);
|