|
@@ -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)
|
|
|