diff --git a/shadowsocks-csharp/Controller/System/SystemProxy.cs b/shadowsocks-csharp/Controller/System/SystemProxy.cs index c7ed0d28..29560ff4 100644 --- a/shadowsocks-csharp/Controller/System/SystemProxy.cs +++ b/shadowsocks-csharp/Controller/System/SystemProxy.cs @@ -102,12 +102,16 @@ namespace Shadowsocks.Controller var connections = registry.GetValueNames(); foreach (var each in connections) { - if (!(each.Equals("DefaultConnectionSettings") - || each.Equals("LAN Connection") - || each.Equals("SavedLegacySettings"))) + switch (each) { - //set all the connections's proxy as the lan - registry.SetValue(each, defaultValue); + case "DefaultConnectionSettings": + case "LAN Connection": + case "SavedLegacySettings": + continue; + default: + //set all the connections's proxy as the lan + registry.SetValue(each, defaultValue); + continue; } } NotifyIE();