mirror of https://github.com/Radarr/Radarr
Bug Fixes
This commit is contained in:
parent
6fdbb2b659
commit
d68abc746c
|
@ -4,6 +4,7 @@ using NzbDrone.Common.Extensions;
|
|||
using com.LandonKey.SocksWebProxy.Proxy;
|
||||
using com.LandonKey.SocksWebProxy;
|
||||
using System.Net.Sockets;
|
||||
using System.Linq;
|
||||
|
||||
namespace NzbDrone.Common.Http.Dispatchers
|
||||
{
|
||||
|
@ -31,7 +32,14 @@ namespace NzbDrone.Common.Http.Dispatchers
|
|||
|
||||
if (request.Proxy != null && !request.Proxy.ShouldProxyBeBypassed(new Uri(request.Url.FullUri)))
|
||||
{
|
||||
var addresses = Dns.GetHostAddresses(request.Proxy.Host);
|
||||
var proxyHost = request.Proxy.Host;
|
||||
if(request.Proxy.Host == "localhost")
|
||||
{
|
||||
proxyHost = "127.0.0.1";
|
||||
}
|
||||
|
||||
var addresses = Dns.GetHostAddresses(proxyHost);
|
||||
|
||||
var socksUsername = request.Proxy.Username == null ? string.Empty : request.Proxy.Username;
|
||||
var socksPassword = request.Proxy.Password == null ? string.Empty : request.Proxy.Password;
|
||||
|
||||
|
|
|
@ -12,6 +12,8 @@ namespace NzbDrone.Common.Http
|
|||
Port = port;
|
||||
Username = username;
|
||||
Password = password;
|
||||
SubnetFilter = filterSubnet;
|
||||
BypassLocalAddress = bypassLocalAddress;
|
||||
}
|
||||
|
||||
public ProxyType Type { get; private set; }
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
|||
if (_configService.ProxyEnabled)
|
||||
{
|
||||
var addresses = Dns.GetHostAddresses(_configService.ProxyHostname);
|
||||
if(addresses.Length != 1)
|
||||
if(!addresses.Any())
|
||||
{
|
||||
return new HealthCheck(GetType(), HealthCheckResult.Error, "Failed to resolve the IP Address for the Configured Proxy Host: " + _configService.ProxyHostname);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue