Browse Source

Add version info to config file

tags/4.1.3
celeron533 5 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]
public class Configuration
{
public string version;
public List<Server> configs;
// when strategy is set, index is ignored
@@ -100,6 +102,7 @@ namespace Shadowsocks.Model
public static void Save(Configuration config)
{
config.version = UpdateChecker.Version;
if (config.index >= config.configs.Count)
config.index = config.configs.Count - 1;
if (config.index < -1)


Loading…
Cancel
Save