Proxy Support for Sonarr #732

Switch to use Port #0 which just uses the next free port
Non Functional - Code Cleanup
Tabs -> Spaces,
Opps Deleted too much
Refactoring & Code Cleanup & Move Config to DB
remove unneeded line
Clean Up Spaces
Code Review Points on the UI
FIx extra space
Clean Up unrequired changes
Add a HealthCheck.
Extra Check in ProxyCheck. Correctly deal with Socks Authentication
Remove SubModule
Add in Nuget + Tweak ProxyCheck
Code Review Points
Missed Review Point
Add Subnet Filtering, Add ProxyBypass for local addresses. UI updated for property changes.
Fix typo, and copy&paste error
Tweak URL to hit
This commit is contained in:
Lloyd Sparkes 2016-02-02 18:42:22 +00:00
parent 7284ef50eb
commit bfe134ee54
17 changed files with 429 additions and 5 deletions

View file

@ -7,6 +7,8 @@ using NzbDrone.Common.EnvironmentInfo;
using NzbDrone.Core.Configuration.Events;
using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.Messaging.Events;
using NzbDrone.Core.Http;
using NzbDrone.Common.Http;
namespace NzbDrone.Core.Configuration
{
@ -312,6 +314,46 @@ namespace NzbDrone.Core.Configuration
get { return GetValue("HmacSalt", Guid.NewGuid().ToString(), true); }
}
public bool ProxyEnabled
{
get { return GetValueBoolean("ProxyEnabled", false); }
}
public ProxyType ProxyType
{
get { return GetValueEnum<ProxyType>("ProxyType", ProxyType.Http); }
}
public string ProxyHostname
{
get { return GetValue("ProxyHostname", string.Empty); }
}
public int ProxyPort
{
get { return GetValueInt("ProxyPort", 8080); }
}
public string ProxyUsername
{
get { return GetValue("ProxyUsername", string.Empty); }
}
public string ProxyPassword
{
get { return GetValue("ProxyPassword", string.Empty); }
}
public string ProxySubnetFilter
{
get { return GetValue("ProxySubnetFilter", string.Empty); }
}
public bool ProxyBypassLocalAddresses
{
get { return GetValueBoolean("ProxyBypassLocalAddresses", true); }
}
private string GetValue(string key)
{
return GetValue(key, string.Empty);