Fix a problem that forward proxy settings are saved twice

Fix #926
This commit is contained in:
noisyfox
2016-12-09 02:05:42 +11:00
parent 4b067346bf
commit 264b91d6b0
2 changed files with 9 additions and 38 deletions
@@ -220,12 +220,13 @@ namespace Shadowsocks.Controller
SaveConfig(_config);
}
public void EnableProxy(int type, string proxy, int port)
public void EnableProxy(int type, string proxy, int port, int timeout)
{
_config.proxy.useProxy = true;
_config.proxy.proxyType = type;
_config.proxy.proxyServer = proxy;
_config.proxy.proxyPort = port;
_config.proxy.proxyTimeout = timeout;
SaveConfig(_config);
}
@@ -388,16 +389,6 @@ namespace Shadowsocks.Controller
}
}
public void SaveProxyConfig(ProxyConfig newConfig)
{
_config.proxy = newConfig;
Configuration.Save(_config);
if (ConfigChanged != null)
{
ConfigChanged(this, new EventArgs());
}
}
public void SaveHotkeyConfig(HotkeyConfig newConfig)
{
_config.hotkey = newConfig;