Add secret in local pac url.

This commit is contained in:
noisyfox
2016-12-08 18:13:22 +11:00
parent b6cd8e0750
commit 22d8cdeff7
5 changed files with 40 additions and 6 deletions
@@ -269,7 +269,7 @@ namespace Shadowsocks.Controller
}
if (_config.enabled)
{
SystemProxy.Update(_config, true);
SystemProxy.Update(_config, true, null);
}
Encryption.RNG.Close();
}
@@ -347,6 +347,16 @@ namespace Shadowsocks.Controller
}
}
public void ToggleSecureLocalPac(bool enabled)
{
_config.secureLocalPac = enabled;
SaveConfig(_config);
if (ConfigChanged != null)
{
ConfigChanged(this, new EventArgs());
}
}
public void ToggleCheckingUpdate(bool enabled)
{
_config.autoCheckUpdate = enabled;
@@ -515,7 +525,7 @@ namespace Shadowsocks.Controller
{
if (_config.enabled)
{
SystemProxy.Update(_config, false);
SystemProxy.Update(_config, false, _pacServer);
_systemProxyIsDirty = true;
}
else
@@ -523,7 +533,7 @@ namespace Shadowsocks.Controller
// only switch it off if we have switched it on
if (_systemProxyIsDirty)
{
SystemProxy.Update(_config, false);
SystemProxy.Update(_config, false, _pacServer);
_systemProxyIsDirty = false;
}
}