Proxy BypassList tests

Lightly refactored and updated documentation to make it easier for users
This commit is contained in:
Lloyd Sparkes
2016-05-02 11:24:51 +01:00
parent c82b90aca8
commit 2b11ad4585
6 changed files with 55 additions and 6 deletions

View File

@@ -25,13 +25,21 @@ namespace NzbDrone.Common.Http.Proxy
public string BypassFilter { get; private set; }
public bool BypassLocalAddress { get; private set; }
public string[] SubnetFilterAsArray
public string[] BypassListAsArray
{
get
{
if (!string.IsNullOrWhiteSpace(BypassFilter))
{
return BypassFilter.Split(';');
var hostlist = BypassFilter.Split(',');
for(int i = 0; i < hostlist.Length; i++)
{
if(hostlist[i].StartsWith("*"))
{
hostlist[i] = ";" + hostlist[i];
}
}
return hostlist;
}
return new string[] { };
}