Proxy sources can now be toggled on/off.

This commit is contained in:
ruri
2019-06-04 15:09:57 +02:00
parent 779d1b1899
commit d845af13e1
4 changed files with 18 additions and 10 deletions
+3
View File
@@ -25,6 +25,9 @@ namespace RuriLib.Models
/// <summary>The unique ID of the RemoteProxySource.</summary>
public int Id { get; set; } = 0;
/// <summary>Whether the RemoteProxySource is active or not.</summary>
public bool Active { get; set; } = true;
/// <summary>The Url of the remote source.</summary>
public string Url { get; set; } = "";
+1 -1
View File
@@ -1015,7 +1015,7 @@ namespace RuriLib.Runner
case ProxyReloadSource.Remote:
List<CProxy> proxies = new List<CProxy>();
Parallel.ForEach(Settings.Proxies.RemoteProxySources, s =>
Parallel.ForEach(Settings.Proxies.RemoteProxySources.Where(s => s.Active), s =>
{
try
{