Skip to content

Commit afb415c

Browse files
committed
🏠 Include geosite:private in geositeDirectGroups by default
- Also adds it for users upgrading from older versions
1 parent b2dd2d9 commit afb415c

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

shadowsocks-csharp/Controller/ShadowsocksController.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ public ShadowsocksController()
101101

102102
ProgramUpdated += (o, e) =>
103103
{
104+
// version update precedures
105+
if (e.OldVersion == "4.3.0.0" || e.OldVersion == "4.3.1.0")
106+
_config.geositeDirectGroups.Add("private");
107+
104108
logger.Info($"Updated from {e.OldVersion} to {e.NewVersion}");
105109
};
106110
}

shadowsocks-csharp/Model/Configuration.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,13 @@ public Configuration()
8686
geositeUrl = "";
8787
geositeDirectGroups = new List<string>()
8888
{
89+
"private",
8990
"cn",
90-
"geolocation-!cn@cn"
91+
"geolocation-!cn@cn",
9192
};
9293
geositeProxiedGroups = new List<string>()
9394
{
94-
"geolocation-!cn"
95+
"geolocation-!cn",
9596
};
9697
geositePreferDirect = false;
9798
userAgent = "ShadowsocksWindows/$version";
@@ -308,6 +309,7 @@ public static bool ValidateGeositeGroupList(List<string> groups)
308309
public static void ResetGeositeDirectGroup(ref List<string> geositeDirectGroups)
309310
{
310311
geositeDirectGroups.Clear();
312+
geositeDirectGroups.Add("private");
311313
geositeDirectGroups.Add("cn");
312314
geositeDirectGroups.Add("geolocation-!cn@cn");
313315
}

0 commit comments

Comments
 (0)