Browse Source

Add version info to config file

tags/4.1.3
celeron533 6 years ago
parent
commit
0e426ffe38
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      shadowsocks-csharp/Model/Configuration.cs

+ 3
- 0
shadowsocks-csharp/Model/Configuration.cs View File

@@ -10,6 +10,8 @@ namespace Shadowsocks.Model
[Serializable] [Serializable]
public class Configuration public class Configuration
{ {
public string version;
public List<Server> configs; public List<Server> configs;
// when strategy is set, index is ignored // when strategy is set, index is ignored
@@ -100,6 +102,7 @@ namespace Shadowsocks.Model
public static void Save(Configuration config) public static void Save(Configuration config)
{ {
config.version = UpdateChecker.Version;
if (config.index >= config.configs.Count) if (config.index >= config.configs.Count)
config.index = config.configs.Count - 1; config.index = config.configs.Count - 1;
if (config.index < -1) if (config.index < -1)


Loading…
Cancel
Save