|
|
@ -1,4 +1,5 @@
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
|
|
|
|
using System.Linq;
|
|
|
|
using NetFwTypeLib;
|
|
|
|
using NetFwTypeLib;
|
|
|
|
using NLog;
|
|
|
|
using NLog;
|
|
|
|
using NzbDrone.Common.EnvironmentInfo;
|
|
|
|
using NzbDrone.Common.EnvironmentInfo;
|
|
|
@ -51,11 +52,7 @@ namespace NzbDrone.Host.AccessControl
|
|
|
|
var mgr = (INetFwMgr)Activator.CreateInstance(netFwMgrType);
|
|
|
|
var mgr = (INetFwMgr)Activator.CreateInstance(netFwMgrType);
|
|
|
|
var ports = mgr.LocalPolicy.GetProfileByType(FIREWALL_PROFILE).GloballyOpenPorts;
|
|
|
|
var ports = mgr.LocalPolicy.GetProfileByType(FIREWALL_PROFILE).GloballyOpenPorts;
|
|
|
|
|
|
|
|
|
|
|
|
foreach (INetFwOpenPort p in ports)
|
|
|
|
return ports.Cast<INetFwOpenPort>().Any(p => p.Port == port);
|
|
|
|
{
|
|
|
|
|
|
|
|
if (p.Port == port)
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|